Reputation: 51
I am using FindBugs (version 1.3.9) Eclipse Plugin. I run findbugs and saved findings in XML file. I need to generate HTML Report of the XML report.
Do we have any tool existing?
I want the output to be similar to: http://mevenide.codehaus.org/maven-eclipse-plugin-plugin/findbugs-report.html
Upvotes: 5
Views: 17982
Reputation: 360
I am using something like this as command line:
$ ./findbugs -textui -userPrefs edu.umd.cs.findbugs.core.prefs -progress\
-maxHeap 1500 -nested:false -output results/outputfile.html -effort:max\
-low -sortByClass **-html:fancy.xsl** -auxclasspath servlet-api.jar\
-auxclasspath selenium-server-standalone-2.43.0.jar\
-auxclasspath commons-lang-2.6.jar ~/Downloads/bodgeit-master
The options can be used to generate HTML output.
You can also use a simple utility called unionBugs to collect all bugs found in different sub-projects, which take arguments output file name with "-output" switch followed by any number of xml files.
Steps:
1. Go to bin subdirectory in Findbugs directory
2. Run ./unionBugs -output <output_file_name.xml> inputfile1 inputfile2 ... inputfilen
3. Later, run a command convertXmlToText to transform XML into HTML file.
./convertXmlToText -longBugCodes -html <input_file1.xml> <output_file.html>
Upvotes: 3
Reputation: 100269
To generate HTML report directly via FindBugs, you may use the following (likely undocumented) command line:
java -cp findbugs.jar edu.umd.cs.findbugs.PrintingBugReporter -html analysisResult.xml >output.html
In general it's just an XSL transformation. The supported XSL files are bundled in findbugs.jar as resources.
Upvotes: 1
Reputation: 1219
You can use xslt to generate the report from the findbugs.xml.
This post shows how to do that: Findbug - ANT xslt stylesheet source code references
Upvotes: 0
Reputation: 8100
I don't have experience with the FindBugs Eclipse plugin, but I know that the FindBugs Ant task has an option to have the output
get produced in html
format. Is there some way to configure the FindBugs Eclipse plugin to produce html output?
Upvotes: 0