Would it be possible to integrate these rules, see below, with MISRA rule texts too ?
Would be easier for the user, who uses the MISRA 2012 addon of cppcheck.
Cppcheck would have the rule texts included if it would be allowed to do that.
But sadly MISRA does not allow to provide the rule texts. You can read more about it here: https://sourceforge.net/p/cppcheck/discussion/general/thread/ccbe9e89/#9013
It was even necessary to sign a license only to support MISRA without the rule texts.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Unfortunately, my question was not precisely enough
I have already implemented the rule texts for all MISRA rules by using misra_rules.txt.
But the following rules, see below, don't have the original rule text, although these rules have a rule text in the file misra_rules.txt. The reason is, cppcheck have this rules already integrated without misra.py.
cppcheck = ['1.3', '2.1', '2.2', '2.4', '2.6', '8.3', '12.2', '13.2', '13.6', '17.5', '18.1', '18.6',
'20.6', '22.1', '22.2', '22.4', '22.6']
So my question is:
Would it be possible to give these mentioned rules the original rule texts when using misra_rules.txt :) ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not sure if this is the right place to post or create a new post for my inquires on the misra addon:
There are about 40 rules from Misra 2012 standard not handled by neither compiler, cppcheck (base), or the misra.py addon:
{'2.3', '2.5', '5.8', '5.9', '6.1', '6.2', '7.2', '7.4', '8.2', '8.4', '8.5', '8.7', '8.8', '8.9', '8.10', '8.13', '9.1', '9.3', '10.2', '10.3', '10.5', '10.7', '11.1', '11.2', '14.3', '15.4', '16.1', '17.2', '17.7', '18.2', '18.3', '18.4', '18.7', '19.1', '20.7', '20.8', '20.9', '20.10', '20.11', '20.12', '21.2', '21.12', '22.3', '22.5'}
Is there plan to implement these rules?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm also interested in this. I've worked on the python side so far but not in the cppcheck side. If there are items that are on the simpler side I can see about implementing them. Is there any guidance on where to implement the rule? Ie in misra.py vs in cppcheck?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello!
Would it be possible to integrate these rules, see below, with MISRA rule texts too ?
Would be easier for the user, who uses the MISRA 2012 addon of cppcheck.
# rules handled by cppcheck
cppcheck = ['1.3', '2.1', '2.2', '2.4', '2.6', '8.3', '12.2', '13.2', '13.6', '17.5', '18.1', '18.6',
'20.6', '22.1', '22.2', '22.4', '22.6']
Best regards and thanks in advance.
Daniel
Cppcheck would have the rule texts included if it would be allowed to do that.
But sadly MISRA does not allow to provide the rule texts. You can read more about it here:
https://sourceforge.net/p/cppcheck/discussion/general/thread/ccbe9e89/#9013
It was even necessary to sign a license only to support MISRA without the rule texts.
Unfortunately, my question was not precisely enough
I have already implemented the rule texts for all MISRA rules by using misra_rules.txt.
But the following rules, see below, don't have the original rule text, although these rules have a rule text in the file misra_rules.txt. The reason is, cppcheck have this rules already integrated without misra.py.
cppcheck = ['1.3', '2.1', '2.2', '2.4', '2.6', '8.3', '12.2', '13.2', '13.6', '17.5', '18.1', '18.6',
'20.6', '22.1', '22.2', '22.4', '22.6']
So my question is:
Would it be possible to give these mentioned rules the original rule texts when using misra_rules.txt :) ?
There is no builtin function to do that right now. But I agree, we should add such functionality.
Thanks for the quick response.
That would be very nice!
Best regards
Daniel
I created the ticket https://trac.cppcheck.net/ticket/8694
Not sure if this is the right place to post or create a new post for my inquires on the misra addon:
There are about 40 rules from Misra 2012 standard not handled by neither compiler, cppcheck (base), or the misra.py addon:
{'2.3', '2.5', '5.8', '5.9', '6.1', '6.2', '7.2', '7.4', '8.2', '8.4', '8.5', '8.7', '8.8', '8.9', '8.10', '8.13', '9.1', '9.3', '10.2', '10.3', '10.5', '10.7', '11.1', '11.2', '14.3', '15.4', '16.1', '17.2', '17.7', '18.2', '18.3', '18.4', '18.7', '19.1', '20.7', '20.8', '20.9', '20.10', '20.11', '20.12', '21.2', '21.12', '22.3', '22.5'}
Is there plan to implement these rules?
We want to have full coverage of MISRA. I see interest in them from users.
However I am not working on it. I do not envision that I will develop the rest of the checkers myself but need help.
Happy news: I got email yesterday from a software engineer that wants to work on this. Maybe there will be action now..
This is great news!
keep me posted.
Thank you.
I'm also interested in this. I've worked on the python side so far but not in the cppcheck side. If there are items that are on the simpler side I can see about implementing them. Is there any guidance on where to implement the rule? Ie in misra.py vs in cppcheck?
Great!
If there is a MISRA rule to warn about undefined behaviour I think that belongs in Cppcheck. Stylistic MISRA rules belong in the script.
So as far as I remember all remaining rules should be implemented in the script.
Do not hesitate to ask if you have questions!
Last edit: Daniel Marjamäki 2018-11-07
There is too little progress in the Cppcheck MISRA addon. I want to change that.
To try to get more progress.. I have created a Kickstarter project:
https://www.kickstarter.com/projects/3300446/improve-misra-checking