---
name: pmd
description: "Use when adopting PMD to assess this standard: Identify risky Java source patterns"
---

# Apply PMD

Choose a ruleset for unused code, error-prone patterns and design limits. Review violations at the source level and test custom rules against minimal fixtures.

## Procedure

1. Inspect the repository configuration and identify the files or targets covered by PMD.
2. Use PMD in this repository to meet this standard: Identify risky Java source patterns. Choose a ruleset for unused code, error-prone patterns and design limits. Review violations at the source level and test custom rules against minimal fixtures. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.
3. Record the tool version, configuration, scope and findings. Explain any checks that could not run.
4. Use the same invocation after changes and compare the evidence against the baseline.

Refer to [the upstream documentation](https://pmd.github.io/) for configuration and prerequisites.
