Problems with FindBugs exclude filter

前端 未结 3 985
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-09 02:22

I am in the process of evaluating FindBugs and am trying to make use of the excludeFilter so that the tool does not process the test packages or the generated ejb stubs.

3条回答
  •  悲哀的现实
    2021-02-09 02:46

    My findbugs exclude file was not working as above. I'm using the findbugs-maven-plugin v3.0.0. To resolve the issue I ran a build which generated findbugsXml.xml, then issued:

    mvn findbugs:gui
    

    This starts the User Interface to findbugs. I then loaded the findbugsXml.xml file, navigated to the warnings I desired excluded, excluded them and then saved the exclusions to findbugs_exclude.xml. I added this to the maven plugin as

    findbugs_exclude.xml
    

    The generated file works and the exclusions are truly omitted from the findbugs report.

    Another great tip I found for the maven plugin was to add:

    UnreadFields
    

提交回复
热议问题