I am trying the free version of Cppcheck (using version 2.6) , I tried to run the following command for checking the misra rules in a particular c file ..
python misra.py --rule-texts=misra_rules_dummy.txt inverter.c
but I got this ... (view in the attachments)
Any idea about what could be ?
Please let me know
Thanks
Hello!
The misra addon runs its analysis on a cppcheck dump file (xml format).
I'd recommend that you run addons using --addon:
--addon
cppcheck --addon=misra.json inverter.c
To load the proper rule texts file, create a misra.json file with this text:
misra.json
{ "script": "misra", "args": [ "--rule-texts=misra_rules_dummy.txt" ] }
If you do not like --addon you can create the dump file manually and run the misra script directly:
cppcheck --dump inverter.c python misra.py --rule-texts=misra_rules_dummy.txt inverter.c.dump
Hello Daniel... Thanks for writing.. With your suggestions now it works...
thanks a lot
Log in to post a comment.
I am trying the free version of Cppcheck (using version 2.6) ,
I tried to run the following command for checking the misra rules in a particular c file ..
python misra.py --rule-texts=misra_rules_dummy.txt inverter.c
but I got this ... (view in the attachments)
Any idea about what could be ?
Please let me know
Thanks
Last edit: Simone Gasparella 2021-11-12
Hello!
The misra addon runs its analysis on a cppcheck dump file (xml format).
I'd recommend that you run addons using
--addon
:To load the proper rule texts file, create a
misra.json
file with this text:If you do not like
--addon
you can create the dump file manually and run the misra script directly:Hello Daniel... Thanks for writing..
With your suggestions now it works...
thanks a lot