ari*_*tll 12 intellij-idea sonarlint sonarlint-intellij
我想抑制一些方法的Sonar lint插件警告,这个问题不是我想要的Intellij SonarLint 2.3 - 忽略规则.
目前我必须用方法注释@SuppressWarnings("all")
,这会抑制所有警告.
dka*_*ejs 30
您可以使用//NOSONAR
或@SuppressWarnings()
但需要指定规则.
从SonarQube 文档:
该
//NOSONAR
标签是在给定的线去激活所有规则有用的,但不适合于停用所有规则(或者仅在给定的规则)用于方法或类的所有行.这就是为什么@SuppressWarnings("all")
SonarQube增加了支持的 原因.在Java插件的SINCE 2.8中,您还可以使用
@SuppressWarnings
带有规则键列表的注释:
@SuppressWarnings("squid:S2078")
或@SuppressWarnings({"squid:S2078", "squid:S2076"})
.
归档时间: |
|
查看次数: |
10131 次 |
最近记录: |