Reputation: 146
I have installed the sonarqube scanner plugin in jenkins and added the below properties in execute sonarqube scanner in the build section of jenkins instance.
# Project identification
sonar.projectKey=BUS.App
sonar.projectVersion=Test
sonar.projectName=BUS App
# Info required for Sonar
sonar.sources=.
sonar.language=cs
#Core C# Settings
sonar.dotnet.visualstudio.solution.file=BUS.Platform2.sln
sonar.dotnet.excludeGeneratedCode=true
#----- Default source code encoding
sonar.sourceEncoding=UTF-8
After the build completion of the instance in sonar server it shows the correct analysis time but doesn't shows the analytics results.
I did the analysis in my project using SonarMSBuild (not in jenkins locally in the project folder), it shows the results correctly.
This is how the sonar server after jekins build.
Does my sonar scanner properties are wrong? or did I missed something?
This is how my build section looks in jenkins configure.
Upvotes: 0
Views: 1349
Reputation: 22824
That's not how you analyze C#. As described in the docs You need
You'll pass a couple properties in to the Begin Analysis step, but by and large you don't need those properties.
And you particularly don't need sonar.language
which was deprecated years ago.
Upvotes: 2