97971a550f
GitHub intends for every GitHub Action to migrate to Node 20 by Spring 2024, and we are on Spring 2024. To move forward and do not cause inconveniences to users (due to the deprecation warning that this action shows when used on workflows) and GitHub (so that they don't have reasons to delay the upgrade), let's update this action to use Node 20. As far as I can see, this action does not need any code changes to work under a Node 20 runtime. Fixes #86. |
||
---|---|---|
.github | ||
__tests__ | ||
dist | ||
src | ||
.eslintignore | ||
.eslintrc.json | ||
.gitattributes | ||
.gitignore | ||
.prettierignore | ||
.prettierrc.json | ||
action.yml | ||
jest.config.js | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
README.md | ||
tsconfig.json |
GitHub Action: Run Clippy with reviewdog
This action runs Clippy with reviewdog on pull requests to improve code review experience.
Example usage
name: clippy-action
on: [pull_request]
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: giraffate/clippy-action@v1
with:
reporter: 'github-pr-review'
github_token: ${{ secrets.GITHUB_TOKEN }}
Inputs
github_token
Optional. Default is ${{ github.token }}
.
clippy_flags
Optional. clippy flags. (cargo clippy --color never -q --message-format json <clippy_flags>
)
For example, clippy_flags: -- -Dwarnings
.
tool_name
Optional. Tool name to use for reviewdog reporter. Useful when running multiple actions with different config.
level
Optional. Report level for reviewdog [info,warning,error].
It's same as -level
flag of reviewdog.
workdir
Optional. Working directory relative to the root directory.
reporter
Optional. Reporter of reviewdog command [github-pr-check,github-pr-review].
It's same as -reporter
flag of reviewdog.
github-pr-review
cargo clippy |
cargo clippy -- -Dwarnings |
---|---|
github-pr-check
cargo clippy |
cargo clippy -- -Dwarnings |
---|---|
filter_mode
Optional. Filtering mode for the reviewdog command [added,diff_context,file,nofilter]. Default is added.
fail_on_error
Optional. Exit code for reviewdog when errors are found [true
, false
]
Default is false
.
reviewdog_flags
Optional. Additional reviewdog flags
reviewdog_version
Optional. Install a specific version of reviewdog. By default, the latest version of reviewdog is installed.