简体   繁体   中英

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:

在此处输入图像描述

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?

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

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM