I created a cppcheck project in the GUI version and enabled the misra addon and specified the location of my misra rules text file. This works and shows me the misra rule violations.
Now, when I run cppcheck on the command line with:
cppcheck --addon=misra.json --project=test.cppcheck
This doesn't work, it gives me:
style: misra violation (use --rule-texts=<file> to get proper output) [misra-c2012-8.9]
When I look in the .cppcheck file it has the misra addon enabled but not a path to the rule file. And when running the command adding the --addon=misra.json argument does not help.
I want to use the .cppcheck file for both in the GUI and command line, so I don't have to change the command, I would just use the .cppcheck file instead.
Has anyone done this before or had any luck with it?
Any help is appreciated!
misra.json:
{
"script": "misra.py",
"args": [
"--rule-texts=misracheck.txt"
]
}