addons/README.md
Addons are scripts that analyses Cppcheck dump files to check compatibility with secure coding standards and to locate various issues.
--rule-texts key. Some examples of rule texts files available in tests directory.misra addon.namingng addon.namingng addon enforcing the ROS naming convention for C++ .cppcheck --addon=misc src/test.c
For project-wide analysis with compile_commands.json:
cppcheck --project=build/compile_commands.json --addon=y2038
It is also possible to call scripts as follows:
cppcheck --dump --quiet src/test.c
python misc.py src/test.c.dump
python misra.py --rule-texts=~/misra_rules.txt src/test.c.dump
This allows you to add additional parameters when calling the script (for example, --rule-texts for misra.py). The full list of available parameters can be found by calling any script with the --help flag.
When using the graphical interface cppcheck-gui, the selection and configuration of addons is carried out on the tab Addons and tools in the project settings (Edit Project File):