pmd

Find bugs and code quality issues in Java, JavaScript, and other languages

brewmacoslinux
Try with needOr install directly
Source

About

Source code analyzer for Java, JavaScript, and more

Commands

pmd

Examples

check java code for common bugs and style problems$ pmd check -d src/main/java -R category/java/bestpractices
find unused variables and dead code in javascript files$ pmd check -d src -R category/javascript/bestpractices
scan project and generate HTML report of all issues$ pmd check -d . -R category/java/bestpractices -f html -r report.html
analyze code and show violations in json format$ pmd check -d src -R category/java/design -f json
run specific code quality rule on source directory$ pmd check -d src/main/java -R rulesets/java/quickstart.xml