# Cppcheck Notes Use this only when AirSDB needs cppcheck install or command details. ## Sources - Official open-source download page: https://cppcheck.sourceforge.io/ - Official repository package notes: https://github.com/danmar/cppcheck - Official manual: https://cppcheck.sourceforge.io/manual.html - User-provided Chinese guide: https://www.zeeklog.com/cppcheckzhong-ji-zhi-nan-cong-ling-kai-shi-zhang-wo-c-c-jing-tai-dai-ma-fen-xi - User-provided download reference: http://cppcheck.net/#download ## Install Notes - The official page lists current open-source releases and package-manager examples. - Windows official installer is linked from the Cppcheck open-source page. - Package managers can be convenient but may lag behind official releases. - AirSDB auto-configures with package managers first because it must be non-interactive for agent workflows. ## Command Notes - Prefer `cppcheck --project=compile_commands.json` when the project has a compilation database. - Generate a CMake compilation database with `cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .` when appropriate. - Use `--xml --xml-version=2` for machine-readable reports. - Use `--cppcheck-build-dir=` for incremental analysis and better whole-program analysis. - Use `-i` to skip generated/vendor directories. - Use suppressions instead of deleting warnings when a finding is a known false positive.