| id | CI-005 | |||
|---|---|---|---|---|
| workflow | github | |||
| github_issue | emulebb/emulebb#44 | |||
| title | cppcheck — integrate complementary bug-class analysis | |||
| status | OPEN | |||
| priority | Minor | |||
| category | ci | |||
| labels |
|
|||
| milestone | ||||
| created | 2026-04-08 | |||
| source | AUDIT-CODEQUALITY.md (Phase 5) | |||
| depends-on | CI-001 |
Workflow status is tracked in GitHub: emulebb/emulebb#44. This local document is retained as an engineering spec/evidence record.
cppcheck finds a complementary set of bugs to clang-tidy — particularly
resource leaks, uninitialized variables, and integer overflow patterns that
clang-tidy misses. Install and integrate.
winget install Cppcheck.Cppcheck # target 2.14+
cppcheck --version # verifycppcheck `
--project=build/compile_commands.json `
--enable=all `
--suppress=missingIncludeSystem `
--suppress=unmatchedSuppression `
--error-exitcode=1 `
--output-file=cppcheck-report.txt `
srchybrid/| Category | Description |
|---|---|
error |
Definite bugs (always enabled) |
warning |
Possible bugs or undefined behaviour |
performance |
Performance issues |
portability |
Portability issues (Win32 vs POSIX) |
style |
Style and best practices |
- Run
cppcheckon the full tree once and record the baseline error count. - Add CI check that fails if new errors (not in baseline) appear.
- Suppress known false positives with
// cppcheck-suppressinline or in asuppress.txtfile. - Reduce baseline count over time as real issues are fixed.
-
cppcheckinstalled at 2.14+ - CI script runs cppcheck on changed files
- Baseline error count documented
- No regressions (new errors) introduced by new PRs
CI-001 (compile_commands.json for --project flag)