Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

PMD

pmd.github.io

  • Free plan
  • Windows
  • macOS
  • Linux
  • Self-hosted
7.9 Club score Visit pmd.github.io

What PMD is

PMD is a free static code analyzer that checks source code for programming flaws, including unused variables, empty catch blocks, and unnecessary object creation. It offers more than 400 built-in rules and lets teams add rules written in Java or XPath. Its bundled CPD tool detects duplicated code across multiple languages. PMD supports Java, JavaScript, Salesforce Apex and Visualforce, Kotlin, Swift, Modelica, PL/SQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML, and XSL; Scala is supported without Scala rules. It can run from the command line or as a Maven, Ant, Gradle, or bld build operation. For continuous integration, its GitHub Action can produce SARIF reports and fail builds based on violation counts, and PMD documents integrations for GitLab, Jenkins, and Bamboo. IDE integrations include Eclipse, IntelliJ IDEA, and Visual Studio Code, though some listed plugins are not actively maintained. PMD requires Java 8 or above, and only the latest major version is actively developed.

Who it suits

PMD suits developers and teams who want configurable static analysis in their build or CI process. Its broad language support and IDE integrations also serve teams working across varied codebases.

Good to know, and what to watch

  • More than 400 built-in rules are included.
  • Custom rules can be written in Java or XPath.
  • CPD detects duplicated code.
  • GitHub Action can create SARIF reports and fail builds.
  • Requires Java 8 or above.
  • Only the latest major version is actively developed.
  • Some listed IDE plugins are not actively maintained.

PMD

Free

Free plan

The verdict

PMD combines a large built-in ruleset with custom rules, duplicate detection, and build integrations. Check the Java requirement and support status of any older major version or IDE plugin you rely on.

What the maker publishes

Build integrations
PMD can run as Maven, Ant, Gradle and bld build operations or from the command line. source
Build integrations
PMD can be integrated through Maven or Gradle builds, which can be configured to fail when violations are found. source
Built-in rules
PMD includes more than 400 built-in rules and supports custom rules written in Java or XPath. source
CI ecosystem
The project documents integrations for Atlassian Bamboo, GitHub Actions, GitLab and Jenkins. source
CI integration
PMD provides a GitHub Action that runs custom rulesets, creates SARIF reports and can fail builds based on violation counts. source
Copy-paste detection
PMD includes CPD, a copy-paste detector distributed with PMD. source
Duplicate detection
PMD includes CPD, a copy-paste detector that finds duplicated code across many programming languages. source
GitHub Actions
PMD's GitHub Action runs a user-supplied ruleset, creates a SARIF report, and can fail a build based on violation count. source
GitLab
PMD documents a CI/CD component to convert PMD reports into GitLab's Code Quality report format. source
IDE integrations
The project lists integrations for Eclipse, IntelliJ IDEA, and Visual Studio Code, among other IDEs. source
IDE plugin status
The IDE integration page marks some plugins as not actively maintained, including its listed Apache NetBeans and Emacs integrations. source
Installation
PMD requires Java 8 or above and is distributed as a ZIP archive containing PMD and CPD. source
Languages
PMD supports Java, JavaScript, Salesforce Apex and Visualforce, Kotlin, Swift, Modelica, PL/SQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML and XSL; Scala is supported without Scala rules. source
Languages
PMD focuses mainly on Java and Apex and supports 16 other languages, including JavaScript, Kotlin, Swift, and XML. source
License
The PMD repository identifies its license as BSD Style. source
License
The project identifies its license as BSD-style. source
Operating systems
The documentation provides execution instructions for Linux/Unix and Windows, using pmd or pmd.bat. source
Other integrations
The project lists integrations including Codacy, Codiga, Tencent Cloud Code Analysis, MegaLinter and a SonarQube PMD plugin. source
Purpose
PMD is an extensible multilanguage static code analyzer that finds programming flaws such as unused variables, empty catch blocks and unnecessary object creation. source
Purpose
PMD is an extensible cross-language static code analyzer that finds common programming flaws. source
Release verification
Since PMD 7.11.0, binary distribution files have GPG signatures for download verification. source
Rules
PMD includes 400+ built-in rules and supports custom rules written in Java or XPath. source
Security reporting
PMD directs security issue reports to its SECURITY.md policy. source
Support
Users can ask questions through Stack Overflow, GitHub Discussions, Gitter or PMD Guru at Gurubase, and report bugs through GitHub issues. source

Checked against the maker's pages on 2 Oct 2026.