Helge
Helge

Reputation: 335

How can a disabled SonarLint rule be re-enabled in IntelliJ?

I disabled a SonarLint rule in IntelliJ, and then decided that it was a mistake. I disabled the rule using the popup in the editor:

enter image description here

What is the easiest and safest way to re-enable the rule?

The file sonarlint.xml in ~/Library/Application Support/JetBrains/<product><version>/options/ (on Mac, similar for other platforms) holds the information about the disabled rules. I can probably edit it manually, but it would feel safer with a GUI tool to do it.

Is there a better way to re-enable the rule?

Upvotes: 3

Views: 2300

Answers (2)

Jakub Urbański
Jakub Urbański

Reputation: 56

Now this can be reached in

Settings -> Tools -> SonarLint -> Rules -> Restore Default

enter image description here

Upvotes: 2

Helge
Helge

Reputation: 335

I found it. The setting is in Preferences -> Tools -> SonarLint, and NOT in the sub-section Tools -> SonarLint -> Project Settings, where I had looked previously.

Easiest in my case, was to filter the settings by "Show Only Changed":

enter image description here

Upvotes: 7

Related Questions