Tool to create suppression files for Cppcheck from its results.
Project description
cppcheck-suppressor
A tool that creates suppression files from Cppcheck output. The created suppression file can be used as a baseline to run further Cppcheck analysis, highlighting any new errors in the analyzed code.
Setting a baseline helps to see new issues. However, all the errors reported by Cppcheck should be reviewed with care.
Installation
Install the latest cppcheck-suppressor python module with
pip install cppcheck-suppressor
Usage
To use the cppcheck-suppressor together with Cppcheck, first make a throughout analysis of your project with Cppcheck without any suppressions and save the results to a xml file:
cppcheck --xml src/ 2> cppcheck_errors.xml
This assumes your sources are in the src/ folder. Use the arguments for Cppcheck that you would use otherwise - just no --suppress or --suppress-xml arguments, and keep the --xml argument.
Then use the cppcheck-suppressor to create a baseline from the Cppcheck results:
python -m cppcheck_suppressor -f cppcheck_errors.xml -o baseline.xml
And finally use the baseline in the further Cppcheck analyses:
cppcheck --suppress-xml=baseline.xml src/
Now, Cppcheck reports only new issues from the project. The baseline should be updated - especially when any errors are solved from the project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cppcheck_suppressor-0.0.2.tar.gz.
File metadata
- Download URL: cppcheck_suppressor-0.0.2.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5a117154306eb528098988afef102fe24c733d7737c5cb9a4133849c51dd13f
|
|
| MD5 |
a5d4714a88c4a9a32d3d5c1b1a212d39
|
|
| BLAKE2b-256 |
d63924be5e7047951cc03b3cedcefc7b1febc0895fb041c292e2d0d8406b2411
|
File details
Details for the file cppcheck_suppressor-0.0.2-py3-none-any.whl.
File metadata
- Download URL: cppcheck_suppressor-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b58f2b647b20f00f5ad1e031b0b4229973036a469407a4219e9d2ab81dea9f9
|
|
| MD5 |
c89f6d1b610045569fe1fbf71e9f2180
|
|
| BLAKE2b-256 |
682a6fcfab4670c7fab24391c932177a0af7cf9471afc0bfbce471924c6057c2
|