来自
FindBugs Using the Ant Task section
:
includeFilter
可选属性。它指定过滤器的文件名,指定报告哪些错误。见
Chapter 8, Filter Files
.
第8章:
但是,过滤器也可以用于选择要具体报告的错误实例:
$ findbugs -textui -include myIncludeFilter.xml myApp.jar
和
-
通过指定所有类的缩写来匹配特定的测试。
<Match>
<Bug code="DE,UrF,SIC" />
</Match></pre>
所以我假设是这样的:
<Match>
<Bug code="Wa,NP" />
</Match>
在您的include过滤器和
<findbugs includeFilter="path/to/includefilter.xml"...
会是你想要的。
这个
path/to /includeFilter
(或)
excludeFilter
)可能是基于另一个属性的值设置的属性,该属性可以默认为
dev
对于常规构建,
test
对于CI构建,以及
deploy
对于部署生成,并指定您希望在每个阶段看到或不希望看到的特定警告。
希望有帮助。