Here is the sample xml (escaped):
<FindBugsFilter>
<!-- filter out test classes with medium (2) or low (3) warnings -->
<Match>
<Or>
<Class name="~.*\.AbstractTest.+" />
<Class name="~.*Test" />
</Or>
<Bug category="PERFORMANCE,MALICIOUS_CODE,STYLE,SECURITY" />
</Match>
<!-- remove the rules which require all passed vars to be immutable -->
<Match>
<Bug code="EI,EI2" />
</Match>
<!-- Filter out certain categories of bugs -->
<Match>
<Bug category="STYLE" />
</Match>
</FindBugsFilter>
To make this work in eclipse (with findbugs plugin installed) just do the following:
- Create an xml file in your project with the contents from above
- Right click the project name and select Properties
- Choose FindBugs
- Check the box marked Run FindBugs automatically
- Click on the Filter files tab at the top
- Click the Add button next to Exclude filter files:
- Select the xml file you created
- Click OK
No comments:
Post a Comment