sonar-scanner-msbuild icon indicating copy to clipboard operation
sonar-scanner-msbuild copied to clipboard

Add publish Sonar Quality Gate results to Sonar Scanner for MSBuild

Open HofmeisterAn opened this issue 4 years ago • 1 comments

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.

  1. The SonarScanner has all sonar.pullrequest.* properties.
  2. 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 -

HofmeisterAn avatar May 26 '20 09:05 HofmeisterAn

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.

mrmartan avatar Jan 12 '21 10:01 mrmartan