Are there any open-source or free tools out there, that check the MISRA C compliance?
Asked
Active
Viewed 2.8k times
2 Answers
14
Cppcheck (free and open source) has an official addon allowing to check MISRA-C 2012 rules.
The way to do so:
- cppcheck --dump file.c
- python misra.py file.c.dump
You can simply find misra.py in your Cppcheck installation or here: https://github.com/danmar/cppcheck/blob/master/addons/misra.py

begarco
- 751
- 7
- 20
-
1Unfortunately, Cppcheck needs MISRA rules for this addon to work. These rules are not free and are not provided with Cppcheck. – TonioGA Dec 06 '19 at 06:53
-
3Cppcheck does not need MISRA rules for this addon to work: if MISRA rules are providen users get full rules' message when an issue is found, otherwise users get only MISRA rules' id. – begarco Dec 07 '19 at 23:04
8
Relatively speaking, PC-Lint is virtually free when compared to full-blown static analysis tools with MISRA compliance checks. Furthermore, I have found that PC-Lint does a better job of reporting than those expensive (i.e. >$20,000) tools.

Throwback1986
- 5,887
- 1
- 30
- 22
-
1PC-Lint supports MISRA C and C++ compliance checking: http://www.gimpel.com/html/misra.htm – Throwback1986 Jun 04 '15 at 14:46
-
-
2Detail: "PC-Lint is virtually free" --> Found quote: "PC-lint - One Workstation License (non-floating) 389.00" – chux - Reinstate Monica Mar 25 '20 at 16:34