findbugs is important java tool for static code analysis. There is also maven findbug plugin.
The tool write XML report file. Sometimes, there is a need to exclude from the report some detected bug. findbugs can use filter files to include or exclude bugs. The maven plugin can use this files using exclude property.
There is simple way to generate that file:
Open file:
Find the bug and filter it
Export the filter file
Check the file:
The tool write XML report file. Sometimes, there is a need to exclude from the report some detected bug. findbugs can use filter files to include or exclude bugs. The maven plugin can use this files using exclude property.
There is simple way to generate that file:
- Run the findbugs to create the report with the bugs to be excluded (mvn findbugs:findbugs)
- Run the findbugs GUI (mvn findbugs:gui)
- Open the report file
- Find the bug to exclude
- Right click on bug and choose 'Filter bugs like this'
- Select the categories in the opened dialog
- Export the filter using File->Export filter
- Read the exported file
Open file:
Export the filter file
Check the file:
Comments