Search code examples
intellij-ideasuppress-warningssonarlintsonarlint-intellij

How to disable todo warnings in sonarlint plugin for IntelliJ?


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?


Solution

  • 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: