Feature request: filter issues on severity and rule

intellij
sonarlint
rules
plugin

(Joachim Lous) #1

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.


(G Ann Campbell) #2

Hi,

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

 
Ann


(Joachim Lous) #3

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.


(Janos Gyerik) #6

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.


(Joachim Lous) #7

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.


(Duarte Meneses) #9

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.


(Joachim Lous) #11

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.