Skip to content

Commit d236669

Browse files
committed
readme.md
1 parent 9d235e9 commit d236669

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tools/readme.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ message.
8484
Script to compare the error IDs in the expected `testrunner` output (without executing it) with the `--errorlist` output.
8585
It will report missing test coverage for an ID and missing IDs in the `--errorlist` output.
8686

87+
### * tools/generate-baseline-suppressions.py
88+
89+
Script that converts a Cppcheck XML results file (`--xml`) into a Cppcheck XML suppressions file, so that
90+
existing warnings can be suppressed as a baseline and only new warnings are reported afterwards. For each
91+
`<error>` in the results file that has a non-zero `hash` attribute, it writes a `<suppress>` entry with the
92+
error's id, the file of its first `<location>` and the hash. Usage:
93+
```shell
94+
$ cppcheck --xml --xml-version=2 ./src 2> results.xml
95+
$ python tools/generate-baseline-suppressions.py results.xml suppressions.xml
96+
```
97+
The generated `suppressions.xml` can then be passed to Cppcheck with `--suppress-xml=suppressions.xml`.
98+
8799
### * tools/tweak-compile-commands.py
88100

89101
Script to tweak `-isystem`/`--sysroot`/`-I` options in a `compile_commands.json` file, for example to make

0 commit comments

Comments
 (0)