Examples of an AzDo Pipeline running msbuild using a custom quality profile should look like with and without Critical issues

I’m pretty sure we have followed the instructions for setting up an Azure Devops pipeline integration for sonarcloud. It reports stats and such as part of the PR Verification build to sonarcloud.

The projects are bound to sonarcloud so that we get the right rules in sonarlint locally. But when the build pipeline runs its doing unexpected things. I was looking for a known correct example of what it should look like when everything is configured correctly and no violations are present, and of what it looks like when Critical issues are found. Are there any reference cases for that?

Hey,

so what are you expecting from the build pipeline? To fail the build when critical issues are found?

We use the SonarCloud quality gate as a branch policy to protect our long-lived branches:


When the quality gate is not met in the feature branch one wants to merge via pull request, it looks like this (I can’t merge this pull request):

Does this help?

Cheers,
Robin

2 Likes

Our code isn’t in Devops, just the pipelines. It’s not really the quality gate, either. It’s like our quality profile, exclusions and any issue resolved previously in the sonarcloud UI aren’t taken into consideration during the build task and it spits out a bunch of warnings that arent present in the results posted to sonarcloud.

Its like its locked into using SonarLint’s defaults.

Hi @StingyJack

This behavior is “expected” : we know that it’s not convenient but this is the way it’s working right now. There are plan to improve this, but no ETA to give you.

HTH,
Mickaël