PMD Reviewdog Reporter
ActionsAbout
Tags
(2)Run PMD static analysis on your code and report issues as GitHub PR comments via reviewdog.
ℹ️ Note: This action only integrates PMD with reviewdog.
If you want GitHub annotations instead of reviewdog comments,
use the
original pmd-github-action.
By default, this action uses the github-pr-review reporter mode.
In this mode, reviewdog posts PMD findings as PR comments, which you can see in different tabs:
name: PMD Check
on:
pull_request:
paths:
- '**/*.java'
jobs:
pmd-review:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 21
- name: Run PMD + Reviewdog
uses: RodionKorneev/pmd-reviewdog-action@v1
with:
rulesets: 'rulesets/java/quickstart.xml'This is not handled by the action itself because:
- The required Java version may vary between projects.
- Users may already have Java installed on the runner.
- GitHub-hosted runners or self-hosted runners may use different Java distributions.
Therefore, the action assumes that a compatible Java runtime is already available in the environment.
| Input | Default | Description |
|---|---|---|
rulesets |
Comma-separated list of PMD rulesets to use. You can use default rulesets provided by PMD, or create your own custom ruleset and reference it. See |
|
github_token |
${{github.token}} |
GitHub token used by PMD to determine modified files and by reviewdog to post comments. |
pmd_version |
latest |
PMD version to use. Using Available versions: https://github.com/pmd/pmd/releases. See |
pmd_download_url |
Optionally specify a custom URL for downloading the PMD binary. See |
|
workdir |
. |
Directory to run PMD in. See |
analyze_modified_only |
false |
Only analyze files modified in a PR or push instead of all files in See |
upload_sarif_report |
true |
Upload generated SARIF report as artifact named "PMD Report". See |
reviewdog_version |
latest |
Reviewdog version. See |
tool_name |
PMD |
Tool name for reviewdog reporter. |
reporter |
github-pr-review |
Reviewdog reporter type. See available options at: https://github.com/reviewdog/reviewdog#reporters |
level |
error |
Reviewdog report level (info, warning, error). |
fail_level |
any |
Reviewdog fail level. Determines at which level the step fails. See https://github.com/reviewdog/reviewdog?tab=readme-ov-file#exit-codes. |
filter_mode |
nofilter |
Reviewdog filtering mode. See https://github.com/reviewdog/reviewdog?tab=readme-ov-file#filter-mode. |
reviewdog_flags |
Additional flags to pass to reviewdog command. |
This action does not produce outputs, all results are reported via reviewdog in PR comments or GitHub checks.
This action is a composite GitHub Action that combines:
- pmd/pmd-github-action — runs PMD static analysis.
- reviewdog/action-setup — installs reviewdog CLI.
All inputs you provide to pmd-reviewdog-action are used as follows:
rulesets,workdir,pmd_version, etc. → forwarded topmd/pmd-github-action.tool_name,reporter,level,fail_level,filter_mode,reviewdog_flags→ passed to the reviewdog CLI when reporting issues.
A few internal parameters are handled internally, but in general you can configure PMD analysis and reviewdog reporting in a way very similar to using the underlying tools directly.
This action is licensed under the MIT License © Rodion Korneev.
PMD Reviewdog Reporter is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

