How to stop including issues detected by external rules engines

rules

(Ben Meneses Sosa) #1

Hi, I’m using SonarCloud and we’ve been using it with only a few code smell rules to get the team used to it.

Today, I noticed that there were new code smells. When I checked them there was a tag that said “roslyn” and when hovered it says “issue detected by an external rule engine: roslyn”

Could you please indicate how to prevent these kind of rules to add issues in my projects?

Thanks!


Unable to suppress pull request issue because drop down option missing
Unable to suppress pull request issue because drop down option missing
(Christophe Lévis) #2

Hi,

This kind of issues is now reported thanks to a new feature that is available on SonarCloud. SonarCloud automatically imports issues generated by the third-party Roslyn analyzers that are configured on your solutions.
This makes you see, in SonarCloud, the same issues you have locally in Visual Studio.

You can deactivate this behavior for your projects: Administration > General Settings > External analyzers > C# Ignore issues from external Roslyn analyzers.

Out of curiosity, why don’t you want to see those kind of issues in SonarCloud?


(Ben Meneses Sosa) #3

Thanks for your clear answer, Christophe.

The reason I’d like this alerts muted by now is that we’re rolling out static code analysis with only a few very clear rules (long parameter list, cognitive complexity) so the team gains awareness, act on those, and get used to have these in the definition of done.

Due to having a lot of legacy code in our codebase, if we open the floodgates, people will be overwhelmed and confused with lots of rules and alerts.

Our plan is to activate more and more rules progressively.


(Colin Mueller) #4

2 posts were split to a new topic: Customize External Roslyn Rules Imported to SonarQube