Some Misra rules (I assume all) seems to be bypassed when scanning C code.
- I am using SonarQube Developer Edition Version 8.4.2 (build 36762)
- I am using sonar-scanner-cli-184.108.40.2061-windows
- I created a quality profile containing all rules tagged with
- Added a code snippet using goto, which should violate the rule
M14.4: do not use goto (MISRA C)
- Run the scanner on the code, adding
-D"sonar.lang.patterns.c++=**/*.cxx,**/*.cpp,**/*.cc,**/*.hxx,**/*.hpp,**/*.hh"to the cmd line to actually scan the *.c source files
- The Misra rule is not triggered, whereas other code smells are triggered (undocumented APIs, lines too long, …)
This is confirmed also with using IAR Embedded Workbench to enable Misra analysis, that shows rules being triggered, but SonarQube does not.
Thanks for the help