sonar-scanner-msbuild
sonar-scanner-msbuild copied to clipboard
Add publish Sonar Quality Gate results to Sonar Scanner for MSBuild
Is your feature request related to a problem? Please describe.
To analyse our projects in our build pipeline at Azure DevOps we use Sonar Scanner for MSBuild and pass the required properties to the executable. This is a very convenient way to customize the build. However, it’s still necessary to call the SonarQubePrepare@4
and SonarQubePublish@4
tasks too, to receive the quality gate results in Azure DevOps to include them into the related pull request. It should not be necessary to call the tasks.
- The SonarScanner has all
sonar.pullrequest.*
properties. -
GitLab CI/CD supports
sonar.qualitygate.wait=true
.
Describe the solution you'd like
SonarScanner.MSBuild.exe
sould support something like sonar.qualitygate.wait=true
and be able to report the quality gate result back to Azure without the additional tasks.
Describe alternatives you've considered -
Additional context -
The intended way of usage confuses me. Are supposed to use Sonar Scanner for MSBuild
for analysis and then Sonar Scanner CLI
in a different job to wait for quality gate?
I second that the Sonar Scanner for MSBuild
should support the sonar.qualitygate.wait
argument.