java 如何从 Eclipse findbugs 插件导出 findbugs 结果?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/46389/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to export findbugs results from Eclipse findbugs plugin?
提问by Jagmal
I have findbugs plugin for eclipse which when run on my project will show results in Bugs explorer clubbed by the type of bug.
我有 eclipse 的 findbugs 插件,当在我的项目上运行时,它会在 Bug 资源管理器中按错误类型显示结果。
I need to be able to do two things:
我需要能够做两件事:
- Export all these to excel sheet
- Find out the bugs reported in a set of files (and be able to do it recursively w/o running for whole project and exporting and finding out the classes to be modified.
- 将所有这些导出到 Excel 表
- 找出一组文件中报告的错误(并且能够在不为整个项目运行的情况下递归地执行此操作并导出并找出要修改的类。
Any suggestions?
有什么建议?
FYI, I am using MyEclipse v 6.0.1 and FindBugs 1.3.4
仅供参考,我使用的是 MyEclipse v 6.0.1 和 FindBugs 1.3.4
采纳答案by Don Kirkby
Findbugs dumps its results into an XML file in your workspace's .metadata folder. Look for the subfolder that's named something like findbugs.
Findbugs 将其结果转储到工作区的 .metadata 文件夹中的 XML 文件中。查找名为 findbugs 之类的子文件夹。
You can also download a standalone version of Findbugs that will save the results wherever you like.
您还可以下载独立版本的 Findbugs,它将结果保存在您喜欢的任何位置。
Once you have the results file, you might be able to import from XML to Excel and filter there. Alternatively, you can use XSLT to transform to several CSV files and open them in Excel.
获得结果文件后,您就可以从 XML 导入 Excel 并在那里进行过滤。或者,您可以使用 XSLT 转换为多个 CSV 文件并在 Excel 中打开它们。
回答by Simon Damouni
I had the same problem with findbugs some versions ago.
我在某些版本之前遇到了与 findbugs 相同的问题。
I updated the plugin today to version 1.3.8 and found out that you can now export and even import reports as XML directly.
我今天将插件更新到 1.3.8 版,发现您现在可以直接导出甚至导入 XML 格式的报告。
All you have to do is right-click on a project either in the package explorer or in the findbugs "Bug explorer" and select "Findbugs->Save XML" or "Findbugs->Load XML".
您所要做的就是在包资源管理器或 findbugs“错误资源管理器”中右键单击项目,然后选择“Findbugs->Save XML”或“Findbugs->Load XML”。
Finely a proper export and import functionality for a fantastic tool.
非常适合出色工具的适当导出和导入功能。
Btw, I use Eclipse 3.3.2.
顺便说一句,我使用 Eclipse 3.3.2。

