java Findbugs 与 Google CodePro AnalytiX(Eclipse 插件)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11720413/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 06:08:27  来源:igfitidea点击:

Findbugs vs Google CodePro AnalytiX (Eclipse plugins)

javaeclipse-pluginfindbugscodepro

提问by JMarques

I already have used the Google CodePro AnalytiX but I never used Findbugs.

我已经使用过 Google CodePro AnalytiX,但我从未使用过 Findbugs。

My first impression with Findbugs is that it is harder to configure. After that, I believe that both are similar.

我对 Findbugs 的第一印象是它更难配置。在那之后,我相信两者是相似的。

What's your opinion?

你怎么看?

Just one more question related: None of these plugins sent our code to the servers, right? (for example, if we use CodePro our code isn't sent to Google Servers).

还有一个相关的问题:这些插件都没有将我们的代码发送到服务器,对吗?(例如,如果我们使用 CodePro,我们的代码不会发送到 Google 服务器)。

回答by Bananeweizen

Update in 2016: CodePro Analytix is not available anymore, so go with Findbugs.

2016 年更新:CodePro Analytix 不再可用,因此请使用 Findbugs。



Original answer

原答案

better in CodePro Analytix:

在 CodePro Analytix 中更好:

  • Issue level (error, warning, info) can be changed for every item. Findbugs can only enable/disable issues.
  • Many issues can be configured in detail (like the list of blacklisted swear words).
  • Can show you all the issues in the currently openededitors (and adapts this when opening or closing editors), which is much more convinient then selecting packages, projects or whatever and then to manually trigger a scan on them
  • Several issues can be fixed automatically (like declaring all parameters final). In Findbugs everything must be done manually.
  • 可以为每个项目更改问题级别(错误、警告、信息)。Findbugs 只能启用/禁用问题。
  • 许多问题可以详细配置(如黑名单脏话列表)。
  • 可以向您显示当前打开的编辑器中的所有问题(并在打开或关闭编辑器时对此进行调整),这比选择包、项目或其他任何内容然后手动触发对它们的扫描要方便得多
  • 可以自动修复几个问题(例如将所有参数声明为 final)。在 Findbugs 中,一切都必须手动完成。

better in Findbugs:

在 Findbugs 中更好:

  • Is more concentrated on typicalJava programming bugs (but does not have the rich selection of issues like CodePro)
  • does more analysises that need a lot of context information
  • can be used locally in Eclipse or on an integration server like Hudson/Jenkins
  • configuration on Hudson/Jenkins and in local IDE can be shared, so you see the exact same results in your IDE and on the server
  • has a "cloud mode", where distributed teams can share their findings (and the evaluation of the findings), so that they do not all check the same issues again
  • 更专注于典型的Java编程错误(但没有像CodePro那样丰富的问题​​选择)
  • 做更多需要大量上下文信息的分析
  • 可以在 Eclipse 中本地使用,也可以在 Hudson/Jenkins 等集成服务器上使用
  • Hudson/Jenkins 和本地 IDE 上的配置可以共享,因此您可以在 IDE 和服务器上看到完全相同的结果
  • 有一个“云模式”,分布式团队可以在其中共享他们的发现(以及对发现的评估),这样他们就不会再次检查相同的问题

All of the above was more related to how you can work with the tool. The actual finding of bugs may depend very heavily on the project to be checked. In the past I often suggested to use both, Findbugs first, CodePro afterwards:

以上所有内容都与您如何使用该工具有关。错误的实际发现可能在很大程度上取决于要检查的项目。在过去,我经常建议同时使用 Findbugs,然后使用 CodePro

Do the first checks with Findbugs, as it finds the more severe issues. But after those have been fixed, you may find yourself in lots of noisy issues (or even false findings). Therefore after working on the most severe issues of Findbugs, I suggest switching to CodePro Analytix as it has less false findings and can be controlled in more detail.

使用 Findbugs 进行第一次检查,因为它会发现更严重的问题。但是在修复这些问题之后,您可能会发现自己遇到了许多嘈杂的问题(甚至是错误的发现)。因此,在解决了 Findbugs 最严重的问题后,我建议切换到 CodePro Analytix,因为它的错误结果较少,并且可以更详细地控制。