maven findBugs

2018-05-11  本文已影响0人  茶瓯
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>findbugs-maven-plugin</artifactId>
            <version>3.0.4</version>
            <configuration>
                <!-- 设置分析工作的等级,可以为Min、Default和Max -->
                <effort>Default</effort>
                <!--bug等级Low、Medium和High-->
                <threshold>High</threshold>
                <!--发现错误则中断构建-->
                <failOnError>true</failOnError>
                <includeTests>false</includeTests>
                <XmlOutput>true</XmlOutput>
            </configuration>
            <executions>
                <execution>
                    <id>findbugs</id>
                    <phase>package</phase>
                    <goals>
                        <goal>check</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

推荐使用IDEA findbugs插件


findbugs.png

对于查找范围控制更方便,findBugs也有自带的可视化界面,没插件方便

上一篇 下一篇

猜你喜欢

热点阅读