Reputation: 171
I would like Maven to generate a FindBugs report where the bugs are grouped by severity, not by file. Then I would be able to focus on the most serious bugs immediately. I have seen similar functionality with the FindBugs plugin for Eclipse. Is this possible with Maven?
Upvotes: 1
Views: 1091
Reputation: 12741
To answer you amended question, the findbugs-maven-plugin does not currently offer a way to sort bugs via severity. I would suggest you log an enhancement request to the project.
--What follows is my answer to the original question, which simply asked if there was a FindBugs Maven plugin. The question has since changed and is answered above.--
Yes, there is a findbugs-maven-plugin. Add this plugin to the reporting section of your POM and run mvn clean site
to see the report.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<effort>Max</effort>
</configuration>
</plugin>
Upvotes: 2
Reputation:
You should also have a look at Sonar. Its dashboard reports data generated by many code analysers like Findbugs, Checkstyle or Cobertura. It's really quick and easy to navigate in measures like Findbugs bugs. Of course it's possible to filter data by severity (see the page "violations drilldown"). The release 1.9 only supports two levels of severity (mandatory/optional) but next version will define five levels from info to blocker. It should be released next week.
Upvotes: 3