How to disable todo warnings in sonarlint plugin for IntelliJ?
Asked Answered
S

2

6

The SonarLint plugin for Intellij gives warnings for TODOs as well.

By default Intellij highlights TODOs and displays them in a Commit Dialog as well. SonarLint highlighting it again is redundant.

Also, it suppresses one useful feature of Intellij - Intellij highlights TODOs with blue colour which is easier to recognize and scroll to.

Because of the SonarLint plugin, this feature is suppressed. So, I want to disable sonarlint warnings for to-do items only. How can I do that?

Stulin answered 11/5, 2018 at 8:23 Comment(1)
Please consider reviewing my answer and checking if it helped you out (I know it's been a while, perhaps this answer could help others as well). Respectfully, Rann.Cutwater
C
3

AFAIK, you can not ignore rules using the SL (SonarLint) plugin alone.

In order to do so, you must connect to a SQ (SonarQube) server.

The SQ server allows you not only to ignore all the instances of a single rule, but rather to ignore specific instances and allow other instances to appear.

In your case you would simply be disabling the RSPEC-1135 rule.

References:

Cutwater answered 15/5, 2018 at 4:21 Comment(3)
Thanks! But I just use sonarlint plugin in my IDEA. It's not connected to server :(Stulin
@NagabhushanSN I highly recommend you try SonarQube. SonarLint just scratches the surface :)Cutwater
@NagabhushanSN : HTH (Happy To Help). Take care buddy.Cutwater
Y
4

Regarding the highlighting issue: You need to go to Settings > Editor > SonarLint, then click on "Info issue", disable "Inherit values from" and set your preferred error stripe mark.

enter image description here

Yhvh answered 25/1, 2019 at 6:40 Comment(0)
C
3

AFAIK, you can not ignore rules using the SL (SonarLint) plugin alone.

In order to do so, you must connect to a SQ (SonarQube) server.

The SQ server allows you not only to ignore all the instances of a single rule, but rather to ignore specific instances and allow other instances to appear.

In your case you would simply be disabling the RSPEC-1135 rule.

References:

Cutwater answered 15/5, 2018 at 4:21 Comment(3)
Thanks! But I just use sonarlint plugin in my IDEA. It's not connected to server :(Stulin
@NagabhushanSN I highly recommend you try SonarQube. SonarLint just scratches the surface :)Cutwater
@NagabhushanSN : HTH (Happy To Help). Take care buddy.Cutwater

© 2022 - 2024 — McMap. All rights reserved.