Search code examples
intellij-idealomboksonarlintsonarlint-intellij

How to tell SonarLint to stop suggesting Lombok for my entity


In IntelliJ, my SonarLint keeps telling me to use Lombok for getters/setters, but I don't want to. How can I turn this off? I tried to exclude the file but that doesn't seem to have worked. This warning is not in the rules, and there is no warning id. But it's coloring my code and is very distracting.

Field "fundCode" may have Lombok @Getter


Solution

  • I don't think this warning is from SonarLint. As far as I'm aware, the SonarLint plugin will prefix the text below the main suggestion with "SonarLint:".

    Specifically, this seems to be a standard IntelliJ intention (from the Lombok plugin included in IntelliJ), which is displayed if you have Lombok on the classpath. You should be able to disable it under Settings > Editor > Intentions > Java > Lombok > Verbose or redundant code constructs; or just hit Alt+Enter and disable the intention from there.