【问题标题】:How to disable a SonarLint rule for the entire project without connecting to a SonarQube server?如何在不连接到 SonarQube 服务器的情况下禁用整个项目的 SonarLint 规则?
【发布时间】:2018-08-12 11:22:09
【问题描述】:
我有一个 Eclipse 项目,我使用 SonarLint 来查找其中的错误。我遇到了很多假阴性案例(例如squid:S1168),并且没有一种明显的方法可以为整个项目抑制这样的规则,而不必用@SuppressWarnings 或//NOSONAR 标记每个案例.
那么有没有办法为项目禁用特定规则(不是全部)而无需连接到 SonarQube 服务器?
【问题讨论】:
标签:
eclipse
sonarlint
sonarlint-eclipse
【解决方案1】:
幸运的是,他们现在添加了此功能,并且现在可以使用 quickfix 选项或转到 Window > Preferences > SonarLint > Rules Configuration 以每个工作区为基础禁用规则。