This repository preserves the PMD integration from the discontinued xberg-io/pre-commit-hooks library. We use it because the alternative pre-commit-java requires Docker and we need to run PMD directly on the system.
Add this to .pre-commit-config.yaml:
repos:
- repo: https://github.com/lookslikematrix/pre-commit-pmd
rev: main
hooks:
- id: pmd- id: pmd
args: ['-d', 'src', '-R', 'rulesets/java/quickstart.xml', '-minimumpriority', '3']See PMD documentation for available options.
Contributions welcome! Feel free to open issues or submit PRs.
MIT License - see LICENSE file for details
