The Cppcheck 2.9 user manual explains how to run the static analysis tool, configure projects, use addons, and generate reports.
This manual introduces Cppcheck, a cross‑platform static analysis tool for C/C++ code. It describes the supported platforms, required compiler features, and the types of bugs it can detect, such as undefined behavior and dangerous coding patterns.
The guide covers usage via the GUI and command line, project import, file filtering, exclusion options, the experimental Clang parser, severity levels, library configuration, addons (e.g., MISRA, y2038), and how to generate HTML reports from XML output.
| Version | 2.9 |
|---|---|
| Supported Platforms | POSIX, Windows, cross‑platform |
| Minimum Compiler Requirement | C++11 or later |
Run the command `cppcheck file1.c` to analyze that file.
Use the `-i` option followed by the folder name, e.g., `cppcheck -isrc/c src`.
Add `--clang` to the command line to use the Clang parser.
Use the `cppcheck-htmlreport` script with `--file`, `--report-dir`, and `--source-dir` options.