# pmd/pmd

An extensible multilanguage static code analyzer.

Repository: https://github.com/pmd/pmd
Canonical: https://ross.abutalabs.com/products/pmd
Homepage: https://pmd.github.io
Language: Java
License: NOASSERTION
License Family: other
Topics: code-analysis, code-quality, static-analysis, static-code-analysis, linter, java, apex, plsql, swift, hacktoberfest
Last push: 2026-08-26T03:53:26+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 90, longevity 100
- inputs: {"age_days": 5166, "days_push": 7, "days_rel": 65, "gap_med": 28.0, "n_releases_24m": 21}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5473, forks 1589 (observed 2026-08-28T04:09:19.632709+00:00)

## What it is
PMD is an extensible multilanguage static code analyzer that finds common programming flaws like unused variables, empty catch blocks, and unnecessary object creation. It parses source files into ASTs using JavaCC and Antlr, runs 400+ built-in rules (extensible via Java or XPath), and includes CPD, a copy-paste detector for duplicated code.

## Use cases
- find unused variables and empty catch blocks in java code
- detect copy-pasted duplicated code across a codebase
- lint salesforce apex code
- enforce code quality rules in a ci pipeline
- write custom static analysis rules with xpath
- analyze plsql or swift code for common flaws

## When to choose
- you need a mature, extensible static analyzer for java or apex
- you want duplicate code detection across many languages
- you need custom rules written in java or xpath
- you want a cross-platform cli tool with docker support

## When to avoid
- you need dynamic runtime analysis or profiling rather than static checks
- your language is not among the supported ones
- you want an ide-integrated linter with auto-fix capabilities

## Facets
- artifact type: cli-tool
- maturity: stable
- function: linter, parser, developer-tools, code-review
- domain: developer-tools, programming-languages, testing
- platform: jvm, cross-platform, cli
- tags: static-analysis, code-quality, cpd, duplicate-code-detection, custom-rules, xpath-rules, apex, plsql, swift, kotlin, docker

## Member repositories
- pmd/pmd (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:19.632709+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:56:43.549478+00:00, confidence not recorded.
  - readme: https://github.com/pmd/pmd (fetched 2026-08-28T04:09:19.632709+00:00, sha 0868792a5022)
  - homepage: https://pmd.github.io (fetched 2026-08-29T08:51:42.059375+00:00, sha d086b2ce7a80)
- Data as of 2026-08-30T08:39:29.467469+00:00.
