Sonar Cloud PR Decorations

Pull Request Decorations - Azure DevOps

Issues with PR code smells, although the Quality Gate has been configured as extremely relaxing.
We are still getting code smells in our PR and this is blocking our productivity.

We would like to know a fast solution to this issue.

Hey there.

I’m not sure I understand what the issue is.

Even if they are not failing your Quality Gate, issues will still be decorated on your Azure DevOps PR.

You can always modify the Quality Profiles to exclude rules you don’t like.

But it comes back to a big question – why don’t you want your developers fixing maintainability issues?

Hi Colin,

Just to ellaborate further from Ash’s initial post.

We have a project that is showing code smells.

It is running a custom ruleset where all code smells are currently marked as inactive.

If you open the list of code smells from the build they show as highlighted in the code.When you click on a link to the rule it shows as empy (probably because its innactive as it should be)

If we are running a custom profile with all the smell rules turned off, then why are they showing up in the report? It also means when we turn on commenting for our PR’s the PR is spammed with comments about code smells that are not part of our profile.

Can you give an example of some code smells that are being raised? Screenshots would be useful.

Here is just the top of the list of listed code smells.

Opening any of these up then clicking the rule shows this page.

The quality profile being used has all code smells turned off.

image

The profile is specific to c# and the smells being raised are also specific to c# so none of these code smells should be showing up in the report as far as I understand?

Take a look here:

Thanks, Colin. That seems to have resolved our issue.