I am using CPPCheck-2.6 GUI on windows. I tried creating "misra_rules.txt" out of "misra_C_2012.pdf" file using python script as per below. I could see .txt & .json file generated but they are empty.
As the script didn't work for me so, I copied Appendix A rules of MISRA_C_2012.pdf into text file manually. I added this file in addons but still not applied on source files. Attaching the generated rules.txt file for reference. What i am doing wrong here, please help me on this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Tried the code you shared, still not getting warning message for misra. It could be possible, something wrong with my CPPCheck GUI project settings. I am attaching 2 reference images on Addon, any issue with respect to that. Expecting your response asap.
All these buttons are already activated & i am getting warnings also. But looks like none of them belongs to MISRA, even after adding the code you shared. Attaching the report.
I could use Misra rules txt with my source on linux command line. It working for me, could see the misra warnings & errors. Not sure what i missed on the GUI side(Windows). I will explore further on GUI also.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Thanks!
I am using CPPCheck-2.6 GUI on windows. I tried creating "misra_rules.txt" out of "misra_C_2012.pdf" file using python script as per below. I could see .txt & .json file generated but they are empty.
"python3 scripts/cppcheck-misra-parsetexts.py /path/to/MISRA_C_2012.pdf"
As the script didn't work for me so, I copied Appendix A rules of MISRA_C_2012.pdf into text file manually. I added this file in addons but still not applied on source files. Attaching the generated rules.txt file for reference. What i am doing wrong here, please help me on this.
I removed the attachment we can't publish the rule texts. But at first look, the file looks correct..
Can you run on this code:
Using your file that you attached I get a 10.3 warning and the proper rule text is written.
Hi Daniels,
Thanks for the response!
Tried the code you shared, still not getting warning message for misra. It could be possible, something wrong with my CPPCheck GUI project settings. I am attaching 2 reference images on Addon, any issue with respect to that. Expecting your response asap.
does it help if you activate these buttons in the toolbar
Hi Daniel,
Thanks!
All these buttons are already activated & i am getting warnings also. But looks like none of them belongs to MISRA, even after adding the code you shared. Attaching the report.
Hi Daniel,
Thanks!
Any further inputs from your end.
Hi Daniel,
Thanks!
I could use Misra rules txt with my source on linux command line. It working for me, could see the misra warnings & errors. Not sure what i missed on the GUI side(Windows). I will explore further on GUI also.
ok good there is progress. Really strange that it does not work in GUI then.