Reputation: 1868
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.
Upvotes: 2
Views: 537
Reputation: 1
The Lombok intentions and everything else are provided by the Lombok plugin, which is bundled with IntelliJ as of version 2020.3. If you don't want to use Lombok at all you can disable the plugin itself like:
IntelliJ shouldn't even need to reload once the plugin is disabled. I found this question because I was looking for the same thing. I'm not sure if Mark's answer works, I started following but saw when I searched lombok "Plugins" had a result as well, disabling the entire plugin worked.
I am on IDEA Ultimate 2023.2.3
Upvotes: 0
Reputation: 109171
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.
Upvotes: 2