The following pages and posts are tagged with

TitleTypeExcerpt
3rd party rulesets Page Lists rulesets and rules from the community
Ant Task Usage Page PMD Description Runs a set of static code analysis rules on some source code files and generates a list of problems found. Installation Before you can use the pmd task in your ant build.xml file, you need to install PMD and its libraries...
Best Practices Page Choose the rules that are right for you Running every existing rule will result in a huge number of rule violations, most of which will be unimportant. Having to sort through a thousand line report to find the few you’re really interested in takes all the fun out of...
Continuous Integrations plugins Page Introduction PMD can be integrate through some of the Continuous Integration tools that exist now. Here is a list of known (to us) plugin to do so. Jenkins Plugin Ullrich Hafner developed the Warnings Next Generation plugin for Jenkins. It supports PMD among many other linting...
PMD CLI reference Page Full reference for PMD's command-line interface, including options, output formats and supported languages
Configuring rules Page Learn how to configure your rules directly from the ruleset XML.
Finding duplicated code with CPD Page Learn how to use CPD, the copy-paste detector shipped with PMD.
Report formats for CPD Page Overview of the built-in report formats for CPD
Defining rule properties Page Learn how to define your own properties both for Java and XPath rules.
The rule designer Page Learn about the usage and features of the rule designer.
Gradle Page The Gradle Build Tool provides a PMD Plugin that can be added to your build configuration. Technically it is based on the Ant Task. Example In your build.gradle add the following: plugins { id 'pmd' } Custom ruleset...
Incremental Analysis Page Explains how to use incremental analysis to speed up analysis
Installation and basic CLI usage Page Sums up the first steps to set up a CLI installation and get started using PMD
PMD Java API Page The easiest way to run PMD is to just use a build plugin in your favorite build tool like Apache Ant, Apache Maven or Gradle. There are also many integrations for IDEs available, see Tools. If you have your own build tool or want to integrate...
Making rulesets Page A ruleset is an XML configuration file, which describes a collection of rules to be executed in a PMD run. PMD includes built-in rulesets to run quick analys...
Maven PMD Plugin Page Maven 2 and 3 Running the pmd plugin Choosing the plugin version When adding the maven-pmd-plugin to your pom.xml, you need to select a version. To figure out the latest available version, have a look at the official maven-pmd-plugin documentation. As of March 2020, the current...
Using and defining code metrics for custom rules Page Since version 6.0.0, PMD is enhanced with the ability to compute code metrics on Java and Apex source (the so-called Metrics Framework). This framework provi...
Report formats for PMD Page Overview of the built-in report formats for PMD
Rule guidelines Page Rule Guidelines, or the last touches to a rule
Suppressing warnings Page Learn how to suppress some rule violations, from the source code using annotations or comments, or globally from the ruleset
Testing your rules Page Learn how to use PMD's simple test framework for unit testing rules.
Tools / Integrations Page ## Automated Code Review ### Codacy [Codacy](https://www.codacy.com/) automates code reviews and monitors code quality on every commit and pull request. It gives visibility into the technical debt and it can track code style and security issues, code coverage, code duplication, cyclomatic complexity and enforce best practices. Codacy is static analysis...
Writing a custom rule Page Learn how to write a custom rule for PMD
Writing a custom rule Page The information on this page has been split into several separate pages. Please update your bookmarks: * [Introduction to writing rules](pmd_userdocs_extending_writing_rules_intro.html) * [Your First Rule](pmd_userdocs_extending_your_first_rule.html) introduces the basic development process of a rule with a running example * [Writing XPath Rules](pmd_userdocs_extending_writing_xpath_rules.html) explains a bit more about XPath rules and our...
Introduction to writing PMD rules Page Writing your own PMD rules
Writing XPath rules Page This page describes XPath rule support in more details
Your first rule XPath Page Introduction to rule writing through an example.