什么是PMD,FindBugs?

说明:本文为了练习英语,有英文说明和中文翻译。想直接看中文,快速翻一页即可。

什么是PMD?

PMD is an open source static source code analyzer that reports on issues found within application code. PMD includes built-in rule sets and supports the ability to write custom rules. PMD does not report compilation errors, as it only can process well-formed source files. Issues reported by PMD are rather inefficient code, or bad programming habits, which can reduce the performance and maintainability of the program if they accumulate. It can analyze files written in Java, JavaScript, Apex and Visualforce, PLSQL, Apache Velocity, XML, and XSL.
While PMD does not officially stand for anything, it has several unofficial names, the most appropriate probably being Programming Mistake Detector.

PMD是一款静态代码分析器,可以报告程序代码的问题。PMD包含内建的规则和支持自定义规则。PMD不支持报告编译错误,因此可以很好的处理源代码文件。PMD报告的问题都是一些低效率代码,或坏的编程习惯可能导致性能或者维护困难的代码。它可以处理JavaJavaScriptApexVisualforecePLSQLApache ,和SQL文件。但是PMD并没有官方的名字,有一些非官方称呼,最著名的莫过于:Programming Mistake Detector.

参考:PMD wiki

什么是FindBugs?

FindBugs is an open-source static code analyser created by Bill Pugh and David Hovemeyer which detects possible bugs in Java programs. Potential errors are classified in four ranks: (i) scariest, (ii) scary, (iii) troubling and (iv) of concern. This is a hint to the developer about their possible impact or severity. FindBugs operates on Java bytecode, rather than source code. The software is distributed as a stand-alone GUIapplication. There are also plug-ins available for Eclipse, NetBeans, IntelliJIDEA, Gradle, Hudson,Maven, Bamboo and Jenkins.
Additional rule sets can be plugged in FindBugs to increase the set of checks performed.
A successor to FindBugs, called SpotBugs, has been created.

FindBugs 是一款静态代码检查器,由 Bill PughDavid Hovemeyer 创建的,它可以检查java代码可能出现的bug,潜在错误分为4个等级

  • (i) 可怕的(scariest)
  • (ii) 吓人的(scary)
  • (iii) 问题(troubling)
  • (iv) of 令人担心(concern)

这是隐藏在开发中的隐患,FindBugs操作针对的是Java字节码,比源码更深入。它有GUI版本Eclipse, NetBeans, IntelliJIDEA, Gradle, Hudson,Maven, Bamboo and Jenkins有对应插件。FindBugs中也有一系列的规则

FindBugs,有一款继任者–SpotBugs

参考:Find Bugs Wiki

补充一个Android插件,集成了Lint、KtLint、UnitTest、Checkstyle、Findbugs、Pmd.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值