Search code examples
c#sonarqubesonar-runnersonarqube-scan

Some C# issues not found by sonarqube C# scanner


I have a build machine setup with Visual Studio 2015 Update 3 and sonnarqube msbuild scanner 2.2.0.24. On the sonar server side (6.2), I have c# plug-in version 5.5.2.537.

Upon analysing projects, some code smells are not found in the c# files.

I have verified that :

  • Sonar project is using appropriate quality profile.
  • Quality profile contains the rule and said rule is correcly activated.

I have deleted the whole project in sonarqube and re-run the analysis multiple times. For example in a particular .cs file I have the comment density code smell working correcly. However, the rule about handling TODO (s1135) is not working even though I have multiple TODO in the file. Same goes for the rule "Boolean checks should not be inverted" (S1940) that I introduced in the code for testing purpose.

What could cause those issues to not be reported?


Solution

  • I have moved everything to a new build server. Using the same setup and project, all the issues are now correctly reported.