发布于 2015-09-19 00:17:49 | 276 次阅读 | 评论: 0 | 来源: 网友投递
PMD Java代码检查工具
PMD是一种开源分析Java代码错误的工具。与其他分析工具不同的是,PMD通过静态分析获知代码错误。也就是说,在不运行Java程序的情况下报告错误。PMD附带了许多可以直接使用的规则,利用这些规则可以找出Java源程序的许多问题。此外,用户还可以自己定义规则,检查Java代码是否符合某些特定的编码规范。
PMD 5.3.4 发布,此版本主要是 bug 修复:
#1370: ConsecutiveAppendsShouldReuse not detected properly on StringBuffer
#1371: InsufficientStringBufferDeclaration not detected properly on StringBuffer
#1380: InsufficientStringBufferDeclaration false positive when literal string passed to a lookup service
#1384: NullPointerException in ConsecutiveLiteralAppendsRule
#1388: ConstructorCallsOverridableMethodRule doesn't work with params?
#1392: SimplifyStartsWith false-negative
#1393: PMD hanging during DataflowAnomalyAnalysis
#1394: dogfood.xml - Unable to exclude rules [UncommentedEmptyMethod]
#1395: UnusedPrivateMethod false positive for array element method call
#1396: PrematureDeclaration lambda false positive
#1397: StringToString should ignore method references
#1398: False positive for GuardLogStatementJavaUtil with Log4j
#1399: False positive for VariableNamingConventions with annotation @interface
#1400: False positive with JUnit4TestShouldUseBeforeAnnotation
#1401: False positive for StringBuilder.append called with constructor
#1402: Windows-Only: File exclusions are not case insensitive
#1403: False positive UnusedPrivateMethod with JAVA8
#1404: Java8 'Unnecessary use of fully qualified name' in Streams Collector
#1405: UnusedPrivateMethod false positive?
下载:
PMD是一种开源分析Java代码错误的工具。与其他分析工具不同的是,PMD通过静态分析获知代码错误。也就是说,在不运行Java程序的情况下报告错误。PMD附带了许多可以直接使用的规则,利用这些规则可以找出Java源程序的许多问题。此外,用户还可以自己定义规则,检查Java代码是否符合某些特定的编码规范。
PMD支持的编辑器包括:
JDeveloper、 Eclipse、JEdit、JBuilder、BlueJ、CodeGuide、NetBeans/Sun Java Studio Enterprise/Creator、IntelliJ IDEA、TextPad、Maven、Ant,、Gel、JCreator和Emacs。