Sonarqube not reporting misra c violations even though all 4.7k+ rules are activated in the quality profile

Hi,

Sonarqube not reporting misra c violations even though all 4.7k+ rules are activated in the quality profile.
I am using Sonarqube7.6 and sonar-scanner-3.3.0.1492-windows for analyzing

Below is my code

It is violating this rule “M7.1: Octal constant used (MISRA C)” But it is not reporting.

void main() {

int ulBlk_arr[32] = {'\016'};	/* MISRA Violation */

ulBlk_arr[32] = '\015';			/* MISRA Violation */
ulBlk_arr[32] = '\017';			/* MISRA Violation */
ulBlk_arr[32] = '\018';
ulBlk_arr[32] = '\019';	

}

Thanks

That’s a whole lot of rules, way more than SonarCFamily provides, so I’m guessing you’re using a community supported plugin (SonarOpenCommunity/sonar-cxx).

In that case, you probably want to talk to the maintainers of that plugin, or give SonarCFamily ($, or free for open source projects on SonarCloud) a spin! It definitely has a rule for not using Octal values.

3 Likes

Thanks for the reply.
So,Eventhough all rules(misra,…) are activated but violations will not be reported in through this SonarOpenCommunity/sonar-cxx Right?

Then we should migrate to developer edition of sonarqube(which internally provides SonarCFamily plugin) where all issues will be reported.Is this correct?

Any questions about what issues are/aren’t raised via the community plugin should be directed to the maintainers of that plugin.

You should feel free to request a trial license for the Developer Edition of SonarQube and try out SonarCFamily!

Colin