Way to exclude info level code smells from being counted?

Is there a way to prevent sonarcloud from including “Info” level issues in the code smell count.

We have some (roslyn) analyzer rules configured as suggestion level severity in our .editorconfig as that is the level that provides us the best balance in our desired IDE behavior.

However that results in counts for those analyzers being included in the code smell count in our quality gate report both with our pull requests and within the sonarcloud UI. Having these cause a non-zero code smell counts requires wasted time investigating.

Alternatively if there is a way to exclude specific roslyn analyzer diagnostic IDs from the sonar analysis without disabling all roslyn analyzers from the sonar analysis and without disabling them in the .editorconfig we could try that approach. It would be less ideal to have to exclude each rule from the sonarcloud analysis one by one, but better than nothing.

Hi,

Welcome to the community!

Perhaps this is what you’re looking for?

sonar.cs.roslyn.ignoreIssues Set to true to disable import of external issues. Defaults to false.

Unfortunately, it’s boolean, rather than letting you pick and choose based on IDs.

 
HTH,
Ann