The MISRA checks are more difficult to execute than most other cppcheck checks. For example, Stack Overflow recommends performing manual dumps, one per individual C/C++ source file:
That breaks recursion for large C/C++ projects. It requires the user to manage the internals of the misra.py script, risking vendor locking a project's build environment to a specific cppcheck version or OS implementation.
When I hand cppcheck the --enable=all option, I would expect it to run MISRA checks automatically. Can we please promote them to execute in the same pool as all other checks?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I hand cppcheck the --enable=all option, I would expect it to run MISRA checks automatically.
No it's by intention that you enable misra separately.
The --enable=all should enable all the "core" cppcheck checkers. Checkers that we don't feel belong in Cppcheck because of philosophy can be added in addons. Misra philosophy is noisy therefore it does not belong in Cppcheck "core".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The MISRA checks are more difficult to execute than most other cppcheck checks. For example, Stack Overflow recommends performing manual dumps, one per individual C/C++ source file:
https://stackoverflow.com/a/49439561
That breaks recursion for large C/C++ projects. It requires the user to manage the internals of the misra.py script, risking vendor locking a project's build environment to a specific cppcheck version or OS implementation.
When I hand cppcheck the
--enable=all
option, I would expect it to run MISRA checks automatically. Can we please promote them to execute in the same pool asall
other checks?That is unfortunate I recommend that
--addon=misra
is used.I have an example for running misra in the manual:
https://github.com/danmar/cppcheck/blob/main/man/manual.md#running-addons
No it's by intention that you enable misra separately.
The --enable=all should enable all the "core" cppcheck checkers. Checkers that we don't feel belong in Cppcheck because of philosophy can be added in addons. Misra philosophy is noisy therefore it does not belong in Cppcheck "core".
I am very sorry it took so long to reply to this.