Feature request: filter issues on severity and rule

In the intellij-plugin, I wish I could hide issues below certain severities, or belonging to cetrtain rules.
They would still be subject to the quality gate, but if I know that fixing them will not be given first priority, I want other more important issues to stand out.

Hi,

You can turn off specific rules. There are a few more details here.

Ā 
Ann

This does not work when using a server profile, which I would need to for the plugin to be genueinely useful for me.

So I guess my real request is a way to override rule toggling from server profiles.

While searching for the right rule I also noticed that the search feature in the settings only matches complete words. So searching for ā€œduplicateā€ will not find the rule ā€œString literals should not be duplicatedā€. Odd choice IMO.

Thatā€™s kind of going against the whole point of centralized quality profiles. The return on investment for such feature seems low to me.

As for highlighting issues with higher severity, if we improved the sorting order, would that be an improvement?

Thanks for reporting the issue with the rule search. We match whole words only, without considering prefixes. Perhaps that can be improved, with some minimum prefix length.

if we improved the sorting order, would that be an improvement?

Sure. But Iā€™d still prefer to be able to mute source-highlighting of ā€œinfoā€-level issues, or the rules that produce them.

Hi Joachim,

I agree with Janos in the point that overriding rules when connected to a server defeats the purpose of this feature, which is to replicate in SonarLint the same rules as in SonarQube, as close as possible.

If the info-level issues are not relevant, why not disable those rules in SonarQube?

About changing the source highlighting for issues with level ā€˜infoā€™, thatā€™s already possible. .
Go to Settings -> Editor -> Color Scheme -> SonarLint. You can disable completely the highlighting for info-level issues.

1 Like

If the info-level issues are not relevant, why not disable those rules in SonarQube?

I donā€™t control the house rules. If the powers that be have categorised a rule as low as info, that means we allow developer discretion. Itā€™s good to have the reminder in the report, but I still want the code to look ā€œclean for commitā€ (no yellow warning markers) in source view. Using //NOSONAR makes the code light up like a christmas tree, and clutters the code, so we only do that if we need to pass the quality gate and REALLY donā€™t want to follow the suggestion in that particular instance.

Go to Settings -> Editor -> Color Scheme -> SonarLint.

Aha! Thatā€™s what I needed. The settings under SonraLint were so rich it didnā€™t occur to me it might also manifest under the normal inspection settings,.
Thanks.

If the info-level issues are not relevant, why not disable those rules in SonarQube?

The reason is that you may want to start by fixing the more severity issues, so it is a nice to have a feature to allow that kind of filtering.