SonarScanner MSBuild : Code is not scanned against custom diagnostic analyzers

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this

I have created Custom Analyzer C# project with VS 2017 extension. Build Jar from nupkg using Roslyngenerator and placed this jar SonarQube 7.4 / extension - plugin

Later used Sonarscanner build commands with project key, but the rules are not getting scanned… Why does SonarScanner not recognize the analyzers?

As per suggestion by you in below link

I have created Custom rule Analyzer project with Roslyn and placed jar in extension
Later used Sonarscanner build commands with project key, but the rules are not getting scanned… Does SonarScanner not recognize the analyzers?

I am doing exactly what is said in below link

and mentioned suggestion
To get round all of these limitations, you can use the SonarQube Roslyn SDK to generate a custom SonarQube plugin jar that packages up your custom Roslyn analyzer. You don’t need to write any code; just run RoslynSonarQubePluginGenerator.exe against your Roslyn NuGet package and it will create a plugin jar.

I would like to know if anything missed out here.

Thanks!

Please ignore this thread, Reinstalling Build tools have solved this issue.

Thank you!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.