PMD is an extensible multilanguage static code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and so forth. Itâs mainly concerned with Java and Apex, but supports 16 other languages. It comes with 400+ built-in rules. It can be extended with custom rules. It uses JavaCC and Antlr to parse source files into abstract syntax trees (AST) and runs rules against them to find violations. Rules can be written in Java or using a XPath query.
Currently, PMD supports Java, JavaScript, Salesforce.com Apex and Visualforce, Kotlin, Swift, Modelica, PLSQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML and XSL. Scala is supported, but there are currently no Scala rules available.
Additionally, it includes CPD, the copy-paste-detector. CPD finds duplicated code in Coco, C/C++, C#, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Julia, Kotlin, Lua, Matlab, Modelica, Objective-C, Perl, PHP, PLSQL, Python, Ruby, Rust, Salesforce.com Apex and Visualforce, Scala, Swift, T-SQL, Typescript, Apache Velocity, WSDL, XML and XSL.
PMD features many built-in checks (in PMD lingo, rules), which are documented for each language in our Rule references. We also support an extensive API to write your own rules, which you can do either in Java or as a self-contained XPath query.
PMD is most useful when integrated into your build process. It can then be used as a quality gate, to enforce a coding standard for your codebase. Among other things, PMD can be run:
CPD, the copy-paste detector, is also distributed with PMD. You can use it in a variety of ways, which are documented here.
ð¾ DownloadThe latest release of PMD can be downloaded from our Github releases page.
The Logo is available from the Logo Project Page.
ð DocumentationThe rest of this page exposes the contents of the documentation site thematically, which you can further scope down using the blue filter buttons. To navigate the site, you may also use the search bar in the top right, or the sidebar on the left.
⨠ContributorsThis project follows the all-contributors specification. Contributions of any kind welcome!
See credits for the complete list.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4