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 6.9.0 |
檔案名稱 |
pmd-bin-6.9.0.zip
|
檔案大小 |
42.18MB |
系統 |
Windows (All Versions) |
支援語系 |
Multiple languages |
軟體類型 |
開源軟體 |
更新日期 |
2018-10-30 |
更新日誌 |
New and noteworthy Improved Golang CPD Support Thanks to the work of ITBA students Matías Fraga, Tomi De Lucca and Lucas Soncini, Golang is now backed by a proper Antlr Grammar. This means CPD is now better at detecting duplicates, as comments are recognized as such and ignored.
New Rules The new PLSQL rule CodeFormat (plsql-codestyle) verifies that PLSQL code is properly formatted. It checks e.g. for correct indentation in select statements and verifies that each parameter is defined on a separate line.
Fixed Issues All Exclude specific files from command line. Could not find or load main class when using symlinked run.sh LanguageRegistry uses default class loader when invoking ServiceLocator. How to configure "-cache <path>" Broken link to adding new cpd language documentation. Apex ClassCastException caused by Javadoc. Java PMD crashes with java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/xml/ws/Service GuardLogStatement: "There is log block not surrounded by if" doesn't sound right. UnusedImports false positive for static import with package-private method usage. Update CommentDefaultAccessModifierRule to extend AbstractIgnoredAnnotationRule. JUnitTestsShouldIncludeAssert false positive. UnusedImports false positive with static ondemand import with method call. UnnecessaryFullyQualifiedName doesn't flag same package FQCNs. UnnecessaryModifier wrong message public->static Processing error (ClassCastException) if a TYPE_USE annotation is used on a base class in the "extends" clause. JspTokenManager has a problem about jsp scriptlet. Documentation Provide some explanation for WHY duplicate code is bad, like mutations.
API Changes PMD has a new CLI option -ignorelist. With that, you can provide a file containing a comma-delimit list of files, that should be excluded during analysis. The ignorelist is applied after the files have been selected via -dir or -filelist, which means, if the file is in both lists, then it will be ignored. Note: there is no corresponding option for the Ant task, since the feature is already available via Ant's FileSet include/exclude filters.
External Contributions Generalize ANTLR tokens preparing support for ANTLR token filter - Matías Fraga and Tomi De Lucca Update cpd.md with information about risks - David M. Karr Static Modifier on Internal Interface pmd #1356 - avishvat Updated outdated note in the building documentation. - Maikel Steneker Simplify check for 'Test' annotation in JUnitTestsShouldIncludeAssertRule. - Will Winder Add missing null check AbstractJavaAnnotatableNode - Will Winder Upgrading Apache Commons IO from 2.4 to 2.6 - Thunderforge Upgrading Apache Commons Lang 3 from 3.7 to 3.8.1 - Thunderforge Replacing deprecated IO methods with ones that specify a charset - Thunderforge Improved message for GuardLogStatement rule - Felix Lampe Add CPD support for Antlr based grammar on Golang - Matías Fraga Upgrading SLF4J from 1.7.12 to 1.7.25 - Thunderforge Fix Issue 1343: Update CommentDefaultAccessModifierRule - CrazyUnderdog Replacing IOUtils.closeQuietly(foo) with try-with-resources statements - Thunderforge Fix issue 1402: JspTokenManager has a problem about jsp scriptlet - JustPRV Add ignore file path functionality - Jon Moroney Fix broken link - Johan Hammar |
作者 |
PMD |
官網 |
暫無資訊 |