2012-01-12 311 views

回答

0

我沒有與FindBugs的Eclipse插件的經驗,但我知道的FindBugs Ant任務有一個選項有output得到html生產格式。有沒有一些方法來配置FindBugs Eclipse插件來生成html輸出?

FindBugs Ant Task Manual

0

直接通過FindBugs的生成HTML報告,您可以使用以下(可能是無證)命令行:

java -cp findbugs.jar edu.umd.cs.findbugs.PrintingBugReporter -html analysisResult.xml >output.html 

一般來說它只是一個XSL轉換。支持的XSL文件作爲資源捆綁在findbugs.jar中。

2

我使用下面的這個命令行:

./findbugs -textui -userPrefs edu.umd.cs.findbugs.core.prefs -progress -maxHeap 1500 -nested:假- 輸出結果/ 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

粗體選項可用於生成HTML輸出。

你也可以使用一個簡單的工具叫unionBugs收集在不同的子項目,其帶參數的輸出文件名以「 - 輸出」開關後跟任意數量的XML文件中發現的所有錯誤。 步驟:
1.轉到子目錄FindBugs的目錄
2.運行./unionBugs - 輸出inputfile1 inputfile2 ... inputfilen
3.後來,運行命令convertXmlToText將XML轉換爲HTML文件。

./convertXmlToText -longBugCodes -html <input_file1.xml> <output_file.html> 
+0

非常感謝。這對我有效。 – 2016-08-29 08:16:03

+0

很高興爲您服務@AdilAliyev – 2016-08-29 11:17:00