Skip to main content

cppcheck-suppressor

A tool that creates suppression file from Cppcheck results that 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 before setting a baseline should be reviewed with care.

Installation

Install the latest cppcheck-suppressor with

pipx install cppcheck-suppressor

or the python package 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.

After creating the results with Cppcheck, use the cppcheck-suppressor to create a baseline from the results:

cppcheck-suppressor --file cppcheck_errors.xml --output baseline.xml

or

python -m cppcheck_suppressor --file cppcheck_errors.xml --output 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.

Metadata

Release files for cppcheck-suppressor 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cppcheck-suppressor 0.0.3
File Size Uploaded
cppcheck_suppressor-0.0.3.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cppcheck-suppressor 0.0.3
File Interpreter ABI Platform
cppcheck_suppressor-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 13.2 kB

Release files / cppcheck_suppressor-0.0.3.tar.gz

Download URL cppcheck_suppressor-0.0.3.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ab4f2d1def0c1ca2d760f73327914724cfc279d5ad82697692d0838f12e036ec
BLAKE2b-256 checksum
How to use checksums
10e680426479c755f7f78b9f4bfe959ae5baa5e3a1093b2250cf40e2815d4f7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release files / cppcheck_suppressor-0.0.3-py3-none-any.whl

Download URL cppcheck_suppressor-0.0.3-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38990b85396cdd188a22dd43af527313a9ad420204ba39403c330d01bd808c27
BLAKE2b-256 checksum
How to use checksums
94ba435457c97c437c80cad6f12f931e9d384ed7b619b65912c613d20a18793a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page