PMD is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and so forth. It supports Java, JavaScript, XML, XSL.
Available Plugins include:
- Maven PMD.
- Eclipse.
- NetBeans.
- JBuilder.
- JDeveloper.
- IntelliJ IDEA.
PMD additionally includes CPD, the copy-paste-detector. CPD finds duplicated code in Java, C, C++, C#, PHP, Ruby, Fortran, JavaScript, PLSQL, Apache Velocity, Scala, Objective C, Matlab, Python, Go.
軟體資訊 |
檔案版本 |
PMD 5.6.0 |
檔案名稱 |
pmd-bin-5.6.0.zip
|
檔案大小 |
56.14MB |
系統 |
Windows (All Versions) |
支援語系 |
Multiple languages |
軟體類型 |
開源軟體 |
更新日期 |
2017-04-25 |
更新日誌 |
Fixed Issues: General: Inconsistent behavior of Rule.start/Rule.end. Zip file stream closes spuriously when loading rulesets. Shortnames option is broken with relative paths. PMD not executing under git bash. Automated release - github release notes missing. Version 5.5.4 seems to hold file lock on rules JAR (affects Windows only). Apex-apexunit: ApexUnitTestClassShouldHaveAsserts assumes APEX is case sensitive. Apex-complexity: NCSS Method length is incorrect when using method chaining. NCSS Type length is incorrect when using method chaining. apex-security: ApexXSSFromURLParamRule shouldn’t enforce ESAPI usage. String.escapeHtml4 is sufficient. Documentation flaw on Apex Sharing Violations. java: CPD runs into NPE when analyzing Lucene. Parse error on annotation fields with generics. Parse error on method reference with generics. Parse error with local class with 2 or more annotations. CPD: OutOfMemory when analyzing Lucene. Parse error on method reference. CPD throws an NPE when parsing enums with -ignore-identifiers. Symbol Table fails to resolve inner classes. java-basic: SimplifiedTernary: Incorrect ternary operation can be simplified. java-coupling: LoD false positive. java-design: UnnecessaryLocalBeforeReturn false positive for SuppressWarnings annotation. ImmutableField: Private field in inner class gives false positive with lambdas. UnnecessaryLocalBeforeReturn with assert. New Rule: AccesorMethodGeneration - complements accessor class rule. Combine rules AvoidConstantsInInterface and ConstantsInInterface. MissingBreakInSwitch - False positive for continue. UseLocaleWithCaseConversions does not works with ResultSet (false negative). SingularField with lambdas as final fields. NonThreadSafeSingleton: Be more explicit as to why double checked locking is not recommended. UnnecessaryLocalBeforeReturn: ClassCastException in switch case with local variable returned. UnnecessaryLocalBeforeReturn: Enhance by checking usages. AccessorMethodGeneration: Method inside static inner class incorrectly reported. FinalFieldCouldBeStatic: Constant in @interface incorrectly reported as “could be made static”. UnnecessaryLocalBeforeReturn false positive when cloning Maps. Improve quality of AccessorClassGeneration. UnnecessaryLocalBeforeReturn enhancement is overly restrictive – method order matters. AccessorClassGeneration throws ClassCastException when seeing array construction. java-imports: False positive on DontImportJavaLang when importing java.lang.ProcessBuilder. False positive on DontImportJavaLang when importing Java 7’s java.lang.invoke.MethodHandles. UnnecessaryFullyQualifiedNameRule doesn’t take into consideration conflict resolution. UnusedImportRule - False Positive for only usage in Javadoc - {@link ClassName#CONSTANT}. UnnecessaryFullyQualifiedName: Really necessary fully qualified name. java-junit: JUnitTestsShouldIncludeAssertRule should support @Rule as well as @Test(expected = …). NPE applying rule JUnitTestsShouldIncludeAssert. java-logging-java: InvalidSlf4jMessageFormat: False positive with placeholder and exception. InvalidSlf4jMessageFormat: fails with NPE. java-optimizations: RedundantFieldInitializer report for annotation field not explicitly marked as final. UseStringBufferForStringAppends: False Positive with ternary operator. java-strings: ConsecutiveAppendsShouldReuse is not really an optimization. InefficientEmptyStringCheck misses String.trim().isEmpty(). java-unnecessary: UselessParentheses: Parentheses in return statement are incorrectly reported as useless. java-unusedcode: UnusedModifier doesn’t check annotations. UnusedModifier doesn’t check annotations inner classes. UnusedModifier doesn’t check static keyword on nested enum declaration. UnusedLocalVariable false positive. XML: Error while processing xml file with “.webapp” in the file or directory name. psql: Parse error for IS [NOT] NULL construct. javascript: Template strings are not correctly parsed. |
作者 |
PMD |
官網 |
暫無資訊 |