This is a GitHub action to run PMD checks on your code and report the status via reviewdog on pull requests.
An example of how the reported PMD violations will look on a pull request is shown below ([link to example PR](TODO ADD)):
![PR comment with violation](TODO ADD IMAGE)
name: reviewdog
on: [pull_request]
jobs:
checkstyle:
name: runner / pmd
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dbelyaev/action-pmd@v0.0.1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
level: warning
-
Path to the ruleset xml file.
For more information, check PMD / options / rulesets documentation.
Default:
rulesets/java/quickstart.xml
Example:
name: reviewdog on: [pull_request] jobs: checkstyle: name: runner / pmd runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dbelyaev/action-checkstyle@master with: github_token: ${{ secrets.github_token }} reporter: github-pr-review rulesets_path: rulesets/java/quickstart.xml
Link to [example PR](TODO ADD).
-
The working directory relative to the root directory.
Default:
.
(root)
-
Report level for the reviewdog command.
Values:
[info, warning, error]
You can control GitHub status check result with this feature.
Level GitHub Status info
neutral warning
neutral error
failure Default:
info
-
Reporter for the reviewdog command.
For more information, check reviewdog / reporters documentation.
Values:
[github-pr-check, github-check, github-pr-review]
Default:
github-pr-check
-
Filtering mode for the reviewdog command.
For more information, check reviewdog / filter-mode documentation.
Values:
[added, diff_context, file, nofilter]
Default:
added
-
Exit code for reviewdog when errors are found.
Values:
[true, false]
Default:
false
-
Additional reviewdog flags.
Default:
``