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?

k_ssb
  • 6,024
  • 23
  • 47
Nagabhushan S N
  • 6,407
  • 8
  • 44
  • 87
  • 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. – Rann Lifshitz May 15 '18 at 07:26

2 Answers2

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

ss1
  • 1,009
  • 15
  • 32
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:

Rann Lifshitz
  • 4,040
  • 4
  • 22
  • 42