【发布时间】:2014-02-28 02:17:03
【问题描述】:
我正在 Maven 和我的 IntelliJ 中运行 FindBugs。我想确保在任一工具中执行 FindBugs 都会产生相同的分析。如果 IntelliJ 和 Maven 在运行静态分析工具时输出不同的错误/警告,开发人员会感到困惑。
Maven
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.4-SNAPSHOT</version>
</plugin>
FindBugs-IDEA 设置
我看到可以在 Maven 中使用不同的 Thresholds 和 Efforts 配置 FindBugs,但是如何同步 IntelliJ 和 Maven 的 FindBugs 配置?
例子:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.4-SNAPSHOT</version>
<configuration>
<effort>Max</effort>
<threshold>Low</threshold>
...
</plugin>
http://mojo.codehaus.org/findbugs-maven-plugin/examples/violationChecking.html
【问题讨论】:
标签: java maven intellij-idea findbugs