This composite action runs clippy with reviewdog. It depends on clippy-reviewdog-filter.
name: reviewdog / clippy
on:
push:
branches: [ main ]
pull_request:
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install clippy
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: sksat/action-clippy@v0.7.0
if: github.event_name == 'push'
with:
reporter: github-check
- uses: sksat/action-clippy@v0.7.0
if: github.event_name == 'pull_request'
with:
reporter: github-pr-review
Name | Required | Description | Default |
---|---|---|---|
github_token |
✓ | GitHub secret token | ${{ github.token }} |
working_directory |
clippy working directory | ||
tool_name |
✓ | Tool name to use for reviewdog reporte | clippy |
level |
✓ | Report level for reviewdog [info,warning,error] | warning |
reporter |
✓ | Reporter of reviewdog command [github-pr-check,github-pr-review,github-check] | github-pr-check |
filter_mode |
✓ | Filtering mode for the reviewdog command [added,diff_context,file,nofilter] | nofilter |
fail_on_error |
✓ | Exit code for reviewdog when errors are found | false |
reviewdog_flags |
Additional reviewdog flags | ||
clippy_flags |
Additional clippy flags |