Menu

Tree [791096] main /
 History

HTTPS access


File Date Author Commit
 .ci 5 days ago Clément Fournier Clément Fournier [6093a7] [ci] Exclude build resources from spring-framew...
 .github 5 days ago dependabot[bot] dependabot[bot] [cd965b] chore(deps): bump actions/create-github-app-tok...
 .idea 2025-10-19 Clément Fournier Clément Fournier [a9a8bb] Update release notes, ref #6100
 .mvn 2025-07-22 Andreas Dangel Andreas Dangel [2c7aab] Bump maven from 3.9.10 to 3.9.11 (#5910)
 docs 8 hours ago Clément Fournier Clément Fournier [791096] Update release notes, ref #6262
 pmd-ant 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-apex 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-cli 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-coco 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-core 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-cpp 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-cs 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-css 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-dart 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-dist 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-doc 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-fortran 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-gherkin 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-go 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-groovy 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-html 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-java 1 day ago Clément Fournier Clément Fournier [325825] Cleanup: there is at most one guard
 pmd-javascript 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-jsp 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-julia 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-kotlin 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-lang-test 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-languages-deps 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-lua 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-matlab 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-modelica 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-objectivec 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-perl 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-php 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-plsql 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-python 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-ruby 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-rust 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-scala-modules 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-swift 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-test 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-test-schema 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-tsql 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-ui 2019-03-03 Clément Fournier Clément Fournier [3a78b2] Leave a readme behind
 pmd-velocity 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-visualforce 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 pmd-xml 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version
 .all-contributorsrc 4 days ago Andreas Dangel Andreas Dangel [1b792a] Update all contributors
 .gitattributes 2025-05-01 Andreas Dangel Andreas Dangel [ee3e7f] [ci] build: better cross-os caching for local m...
 .gitignore 2025-02-18 Vincent Potucek Vincent Potucek [8f9bae] icon
 CONTRIBUTING.md 2025-01-10 Andreas Dangel Andreas Dangel [419581] [doc] Add SECURITY.md
 LICENSE 2019-09-07 Andreas Dangel Andreas Dangel [c8d6e7] Update license info
 NOTICE 2019-09-07 Andreas Dangel Andreas Dangel [c8d6e7] Update license info
 README.md 2025-10-24 Andreas Dangel Andreas Dangel [f110b5] [doc] Use emoji variants
 SECURITY.md 2025-01-10 Andreas Dangel Andreas Dangel [419581] [doc] Add SECURITY.md
 SPONSORS.md 2025-10-30 Andreas Dangel Andreas Dangel [f59b4d] Update SPONSORS.md
 antlr4-wrapper.xml 2024-11-17 Juan Martín Sotuyo Dodero Juan Martín Sotuyo Dodero [5efe27] Ensure timestamp flags don't collide
 code_of_conduct.md 2020-04-17 Andreas Dangel Andreas Dangel [3eb367] Add code of conduct
 do-release.sh 2025-10-31 Andreas Dangel Andreas Dangel [7ea1c3] chore: Make warning in do-release.sh more visible
 javacc-wrapper.xml 2025-02-21 Andreas Dangel Andreas Dangel [86dda0] [javacc] Move the grammar files to src/main/javacc
 mvnw 2024-06-28 Andreas Dangel Andreas Dangel [e6397d] Bump maven from 3.9.6 to 3.9.8
 mvnw.cmd 2024-06-28 Andreas Dangel Andreas Dangel [e6397d] Bump maven from 3.9.6 to 3.9.8
 package-lock.json 2025-08-17 Andreas Dangel Andreas Dangel [7e3fed] chore(deps): Update tmp from 0.0.33 to 0.2.5 (#...
 package.json 2025-08-17 Andreas Dangel Andreas Dangel [7e3fed] chore(deps): Update tmp from 0.0.33 to 0.2.5 (#...
 pom.xml 4 days ago Andreas Dangel Andreas Dangel [7bf550] [release] Prepare next development version

Read Me

PMD - source code analyzer

PMD Logo

Join the chat
Build Snapshot
Maven Central
Reproducible Builds
Coverage Status
Codacy Badge
Contributor Covenant
Documentation (latest)
Gurubase
Docker Image Version

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, PL/SQL, 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#, CSS, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Julia, Kotlin,
Lua, Matlab, Modelica, Objective-C, Perl, PHP, PL/SQL, Python, Ruby, Salesforce.com Apex and
Visualforce, Scala, Swift, T-SQL, Typescript, Apache Velocity, WSDL, XML and XSL.

🚀️ Installation and Usage

Download the latest binary zip from the releases
and extract it somewhere.

Execute bin/pmd check or bin\pmd.bat check.

See also Getting Started

Demo:

This shows how PMD analyses openjdk:

Demo

There are plugins for Maven and Gradle as well as for various IDEs.
See Tools / Integrations

ℹ️ How to get support?

🤝️ Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Our latest source of PMD can be found on GitHub. Fork us!

For details, see How to contribute to PMD.

The rule designer is developed over at pmd/pmd-designer.
Please see its README for
developer documentation.

💵️ Financial Contributors

Become a financial contributor and help us sustain our community. Contribute

✨️ Contributors

This project follows the all-contributors specification.
Contributions of any kind welcome!

See credits for the complete list.

📝️ License

BSD Style