Menu

Tree [b0ac60] main /
 History

HTTPS access


File Date Author Commit
 .ci 2025-07-31 Andreas Dangel Andreas Dangel [e06909] Bump pmdtester from 1.5.5 to 1.6.0 (#5937)
 .github 22 hours ago dependabot[bot] dependabot[bot] [e0ff20] chore(deps): bump actions/create-github-app-tok...
 .idea 2025-05-30 Andreas Dangel Andreas Dangel [0cdb9c] Prepare pmd release 7.14.0
 .mvn 2025-07-22 Andreas Dangel Andreas Dangel [2c7aab] Bump maven from 3.9.10 to 3.9.11 (#5910)
 docs 3 hours ago Andreas Dangel Andreas Dangel [2cce1f] [doc] Update release notes (#5770, #5847)
 pmd-ant 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-apex 2025-08-01 Andreas Dangel Andreas Dangel [5f61a0] Remove now obsolete tests to verify xml encoding
 pmd-cli 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-coco 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-core 19 hours ago Sören Glimm Sören Glimm [724707] Fix dogfood in pmd-core
 pmd-cpp 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-cs 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-css 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-dart 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-dist 2025-08-05 dependabot[bot] dependabot[bot] [0cbaba] chore(deps-dev): bump org.apache.commons:common...
 pmd-doc 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-fortran 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-gherkin 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-go 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-groovy 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-html 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-java 3 hours ago Andreas Dangel Andreas Dangel [b0ac60] [java] ShortVariable - improve detection of unn...
 pmd-javascript 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-jsp 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-julia 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-kotlin 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-lang-test 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-languages-deps 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-lua 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-matlab 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-modelica 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-objectivec 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-perl 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-php 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-plsql 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-python 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-ruby 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-rust 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-scala-modules 2025-08-05 dependabot[bot] dependabot[bot] [20fece] chore(deps): bump scalameta.version from 4.13.8...
 pmd-swift 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-test 2025-08-01 Andreas Dangel Andreas Dangel [fbfe75] Add missing encodings to XML files
 pmd-test-schema 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-tsql 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-ui 2019-03-03 Clément Fournier Clément Fournier [3a78b2] Leave a readme behind
 pmd-velocity 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-visualforce 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 pmd-xml 2025-07-25 Andreas Dangel Andreas Dangel [25a5d0] [release] Prepare next development version
 .all-contributorsrc 2025-08-08 Andreas Dangel Andreas Dangel [b4017c] Update @UncleOwen as a contributor
 .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-07-17 Andreas Dangel Andreas Dangel [e2307b] README.md: Fix build badge
 SECURITY.md 2025-01-10 Andreas Dangel Andreas Dangel [419581] [doc] Add SECURITY.md
 SPONSORS.md 2025-06-06 Andreas Dangel Andreas Dangel [15b6ea] 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-06-19 Andreas Dangel Andreas Dangel [e39cee] [ci] publish-release.yml: update do-release.sh ...
 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 4 days ago dependabot[bot] dependabot[bot] [f6b482] chore(deps-dev): bump all-contributors-cli from...
 package.json 4 days ago dependabot[bot] dependabot[bot] [f6b482] chore(deps-dev): bump all-contributors-cli from...
 pom.xml 21 hours ago Andreas Dangel Andreas Dangel [a272d0] chore(deps): Bump build-tools from 33 to 34 (#5...

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, 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, 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

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.