sti*_*vlo 30 java eclipse findbugs
我之前使用过FindBugs并且我没有遇到任何问题,但是这次在Eclipse Helios上发现了Ubuntu Natty Narval错误但未显示.
这是我试过的:
我尝试使用以下方法进行自己的观点:Open Perspective> Other> FindBugs但Bug Explorer为空.
有什么想法来查看这些错误吗?
更新:在Eclipse错误日志中,我看到:
!ENTRY edu.umd.cs.findbugs.plugin.eclipse 2 2 2011-06-18 21:13:24.968
!MESSAGE The following classes needed for FindBugs analysis on project **
were missing:
!SUBENTRY 1 edu.umd.cs.findbugs.plugin.eclipse 2 0 2011-06-18 21:13:24.969
!MESSAGE org.apache.commons.exec.CommandLine
!SUBENTRY 1 edu.umd.cs.findbugs.plugin.eclipse 2 0 2011-06-18 21:13:24.969
!MESSAGE org.apache.commons.exec.DefaultExecutor
!SUBENTRY 1 edu.umd.cs.findbugs.plugin.eclipse 2 0 2011-06-18 21:13:24.969
!MESSAGE org.apache.commons.exec.ExecuteException
Run Code Online (Sandbox Code Playgroud)
更新2:我不知道如何修复Eclipse,但我找到了一个解决方法.我将findbugs报告添加到maven的pom.xml中
<reporting>
<plugins>
[...]
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.3.3-SNAPSHOT</version>
<configuration>
<xmlOutput>true</xmlOutput>
<!-- Optional derectory to put findbugs xdoc xml report -->
<xmlOutputDirectory>target/site</xmlOutputDirectory>
</configuration>
</plugin>
</plugins>
</reporting>
Run Code Online (Sandbox Code Playgroud)
以下配置在target/site/findbugs.html中生成HTML报告
Ray*_*oal 58
如果你在一些项目中出现错误而在其他项目中没有出现错误,那么问题可能是一个项目中的错误不足以显示出来.
我遇到了同样的问题(编辑器中的Open Analysis Results中显示了30个错误)但在Problems视图或Find Bugs Explorer中没有.以下对我有用:
1. Project -> Properties -> Find Bugs
2. Enable Project Specific Settings
3. Check everything under Report Visible Bug Categories
4. Slide minium rank to report to 20
5. Set minimum confidence to Low
6. Rerun FindBugs
Run Code Online (Sandbox Code Playgroud)
这可能是您的问题视图的配置问题。执行以下步骤以确保 findbugs 发现结果显示在问题视图中:
现在问题视图应该向您显示之前的 3 个发现。
或者,您可以使用 Findbugs 视角来更深入地了解所发现的问题。
我在 Findbugs Eclipse 插件页面上找到了一个附加条目:Eclipse Plugin loads, but does not work Excellent。也检查一下。
当 Findbugs 尝试分析您的类(而不是:源代码)时,您的代码使用的类必须可用。我不知道这对于哪些错误模式是必要的,但对于某些(流分析),所使用的类必须是可访问的。因此要确保所使用的类(直接或间接)在eclipse的加载路径中可见。
| 归档时间: |
|
| 查看次数: |
28156 次 |
| 最近记录: |