pmd/README.md

6.1 KiB
Raw Permalink Blame History

Added line: 197 Added line: 3456 Added line: 996 Added line: 3641

PMD - source code analyzer

Added line: 9948

PMD Logo Added line: 6023 Added line: 6752

Added line: 1666 Join the chat Build Status Added line: 9428 Added line: 8307 Added line: 5656 Added line: 9073 Added line: 379 Added line: 7887 Added line: 5565 Added line: 9358 Added line: 3986 Maven Central Added line: 7996 Added line: 5862 Reproducible Builds Coverage Status Codacy Badge Contributor Covenant Added line: 9600 Added line: 3596 Added line: 6847 Added line: 9652 Documentation (latest) Added line: 9163

Added line: 1822 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.

Added line: 5219 Currently, PMD supports Java, JavaScript, Salesforce.com Apex and Visualforce, Added line: 4152 Added line: 5266 Added line: 1747 Added line: 8657 Added line: 1802 Added line: 6277 Added line: 411 Kotlin, Swift, Modelica, PLSQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML and XSL. Added line: 707 Added line: 2944 Scala is supported, but there are currently no Scala rules available.

Added line: 7518 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 Added line: 826 Visualforce, Scala, Swift, T-SQL, Typescript, Apache Velocity, WSDL, XML and XSL.

Added line: 7368 Added line: 4

🚀 Installation and Usage

Added line: 306 Download the latest binary zip from the releases Added line: 2410 Added line: 2360 Added line: 8378 Added line: 1631

Added line: 5829 Execute bin/pmd check or bin\pmd.bat check.

Added line: 4259 See also Getting Started Added line: 6755

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?

Added line: 9673 Added line: 4858 Added line: 8880

  • How do I? -- Ask a question on StackOverflow Added line: 4996
  • I got this error, why? -- Ask a question on StackOverflow or on discussions. Added line: 283
  • I got this error and I'm sure it's a bug -- file an issue. Added line: 8625 Added line: 1481
  • I have an idea/request/question -- create a new discussion. Added line: 4762
  • I have a quick question -- ask in our Gitter room. Added line: 390 Added line: 3080 Added line: 124 Added line: 3074
  • Where's your documentation? -- https://docs.pmd-code.org/latest/ Added line: 7903

Added line: 3362 Added line: 3918

🤝 Contributing

Added line: 2452 Added line: 2952 Added line: 7325 Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Added line: 3190

Our latest source of PMD can be found on GitHub. Fork us! Added line: 9208

Added line: 4065

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

Added line: 1263

💵 Financial Contributors

Added line: 1554 Become a financial contributor and help us sustain our community. Contribute Added line: 7776

Contributors

Added line: 8951 This project follows the all-contributors specification. Added line: 6606 Contributions of any kind welcome! Added line: 7479 Added line: 9128

Added line: 1345 Added line: 1060 Added line: 7873 Added line: 902 Added line: 1538 See credits for the complete list. Added line: 1414

Added line: 5382

📝 License

Added line: 5436 Added line: 7077 BSD Style Added line: 7917