NitroDeath666x
NitroDeath666x

Reputation: 55

Sonar scanner - property file folder

I'm using Sonar Scanner this way :

SonarScanner.MSBuild.exe begin /k:"myKey"
MSBuild.exe" "My.sln" /t:Rebuild
SonarScanner.MSBuild.exe end

But it only works if I define a XML property file inside the SonarScanner directory, quite ugly. I would like to share Sonar Scanner tool for all my projects, any idea to move the XML file into each application source folder ? I didn't find any documentation to help me.

The best case would be server address in property file inside runner folder and project settings into the property file inside each application project.

Thanks

Upvotes: 0

Views: 964

Answers (1)

NitroDeath666x
NitroDeath666x

Reputation: 55

After hours of tries and search I finally got it there : https://github.com/SonarSource/sonar-scanner-msbuild/blob/master/docs/SonarQube.Analysis.xml

Just use the 's' param :

SonarScanner.MSBuild.exe begin /k:"myKey" /s:"C:\myProperties.xml"
MSBuild.exe" "My.sln" /t:Rebuild
SonarScanner.MSBuild.exe end

Upvotes: 2

Related Questions