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.
I have tried the following:
<FindBugsFilter>
<!-- Match any test packages -->
<Match>
<Package name="~.*\.test"/>
</Match>
<Match>
<Or>
<Class name="~.*\.^_*"/>
<Class name="~.*EJS*"/>
</Or>
<Bug pattern="MALICIOUS_CODE"/>
</Match>
The generated EJB's are still being looked at. Can someone provide some better direction on this.
I want to exclude out all classes that start with "_"
Example:
com/mycompany/business/admin/ejb/_AdminRemoteHome_Stub.java
com/mycompany/business/admin/ejb/_EJSRemoteStatelessAdminHome_054d51b9_Tie.java
Updated filter file.
I change the filter file to the following structure using the suggested regx changes and now things are working as expected:
<FindBugsFilter>
<!-- Match any test packages -->
<Match>
<Package name="~.*\.test"/>
</Match>
<Match>
<Class name="~.*\._.*"/>
</Match>
<Match>
<Class name="~.*?EJS.*"/>
</Match>
Looks like I need to go back and brush up on my regx.