SonarCloud - Ignore Roslyn Issue

Hi Team,

The Roslyn Issue are being imported to Sonar, but I have gone into each project to ignore them by adding:

<ItemGroup>
  <SonarQubeSetting Include="sonar.cs.roslyn.ignoreIssues">
    <Value>true</Value>
  </SonarQubeSetting>
</ItemGroup>

this approach didn’t work, only when run dotnet scanner begin with flag /dsonar.cs.roslyn.ignoreIssues=true

How can I ignore Roslyn issues, without setting-up the property at scanner level?

Best,
Emanuel

Hey there.

sonar.cs.roslyn.ignoreIssues isn’t valid at a module-level.

Can you explain why you don’t want to set the property at a scanner level?

These issues are being reported in MVS and we have visibility over there, by reporting to sonar they fail Quality Gates. The reporting issues are being handled in a separate thread (part of Technical Debt). Also, there are false positives!

Hey there.

I understand why you want to ignore the issues, but what I want to know is why you don’t want to set the property at the scanner-level.

We work with templates, and a template is applied to all projects, which means I need to change the yaml template for the CI/CD.
It makes more sense for me, the Developer with QA, to minimize these warnings on the project level, and each team can decide whether to ignore them or not. Hence, I can have the issues reported in all projects, and only the ones more critical or where we need to manage a large number, just don’t report to sonar.