CheckOps
PMD
PMD is an extensible, BSD-style licensed multi-language static code analyser for Java, Apex, Kotlin, JavaScript and more, with a copy-paste detector (CPD).
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
PMD is an extensible multi-language static code analyser. It is best known for Java and Salesforce Apex, and also supports languages such as Kotlin, Swift, JavaScript, PL/SQL, Visualforce, XML and others.
Rules find common flaws such as unused variables, empty catch blocks, unnecessary object creation and overly complex methods. Custom rules can be written in Java or as XPath queries over the syntax tree. PMD includes CPD, a copy-paste detector that finds duplicated code across many more languages. Maven, Gradle and Ant plugins and IDE integrations run it in builds.
In the quality loop PMD is a JVM and Apex static gate, often alongside SpotBugs and Checkstyle.
The source code is at pmd/pmd on GitHub under the BSD-style licence, with about 5,500 stars; the most recent commit was on 11 November 2026.
Features
- Multi-language: Java, Apex, Kotlin, JavaScript, PL/SQL and more.
- Rule sets: Best practices, design, error-prone, performance.
- XPath rules: Write custom rules without Java.
- CPD: Duplicate code detection.
- Build plugins: Maven, Gradle and Ant.
- Report formats: XML, HTML, SARIF and others.
Pros
- Apex support: One of few strong open tools for Salesforce code.
- Free to use: Open source under the BSD-style licence, so the core tool costs nothing to use.
- Actively maintained: The repository had commits as recent as 11 November 2026.
- Community: About 5,500 GitHub stars.
Cons
- Rule tuning: Default sets can be noisy.
- Source-level only: Bytecode issues need SpotBugs.
- Major version migration: PMD 7 changed rule APIs.
Usage and Links (Example)
pmd check -d src/main/java -R rulesets/java/quickstart.xml -f text
pmd cpd --minimum-tokens 100 -d src
Resources:
Pricing
PMD is free and open source under the BSD-style licence.
Recommended for?
- Java and Salesforce Apex teams.
- Projects tracking duplicated code.
Conclusion
PMD is a long-standing, flexible analyser with notable Apex support and a useful duplicate detector.
Start with the quickstart rule set and expand deliberately.
On CheckOps, PMD is filed under the Release & CI gates stage. Related tools listed here include SpotBugs, Checkstyle, Error Prone, Find Security Bugs, SonarQube and Infer. A short trial on a real project, with your own code, data and pipeline, is usually the fastest way to choose between them, because fit matters more than feature lists. Facts here come from the official site, documentation and repository, checked on 11 November 2026.
Compare
CheckOps pages that put PMD next to related tools. There is no paid placement on these lists.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with PMD side by side.
SSpotBugsSpotBugs is an LGPL-2.1 static analysis tool, the successor to FindBugs, that inspects Java bytecode for bug patterns, with plugins such as Find Security Bugs.Compare with PMD
CCheckstyleCheckstyle is an LGPL-2.1 development tool that checks Java code against a coding standard, with built-in Google and Sun configurations and build integrations.Compare with PMD
EError ProneError Prone is an Apache-2.0 static analysis tool from Google that hooks into the Java compiler to catch common mistakes as compile-time errors, with suggested fixes.Compare with PMD
FFind Security BugsFind Security Bugs is the LGPL-3.0 SpotBugs plugin for security audits of Java web and Android applications, also working with Kotlin, Groovy and Scala projects.Compare with PMD
SSonarQubeModernize your AI workflows with code verification for the agentic era.Compare with PMD
IInferInfer is an MIT static analyser from Meta for Java, C, C++ and Objective-C that finds null dereferences, resource leaks, races and other bugs with inter-procedural analysis.Compare with PMD