No description
Find a file
2022-11-10 08:41:42 +09:00
.github Bump actions/checkout from 2 to 3 2022-11-08 13:32:21 +00:00
__tests__ Initial implementation 2022-11-08 14:01:42 +09:00
dist Accept Clippy flags 2022-11-09 22:22:37 +09:00
src Accept Clippy flags 2022-11-09 22:22:37 +09:00
.eslintignore Use https://github.com/actions/typescript-action 2022-11-01 14:58:59 +09:00
.eslintrc.json Use https://github.com/actions/typescript-action 2022-11-01 14:58:59 +09:00
.gitattributes Use https://github.com/actions/typescript-action 2022-11-01 14:58:59 +09:00
.gitignore Use https://github.com/actions/typescript-action 2022-11-01 14:58:59 +09:00
.prettierignore Use https://github.com/actions/typescript-action 2022-11-01 14:58:59 +09:00
.prettierrc.json Use https://github.com/actions/typescript-action 2022-11-01 14:58:59 +09:00
action.yml Initial commit 2022-11-01 16:07:10 +09:00
jest.config.js Use https://github.com/actions/typescript-action 2022-11-01 14:58:59 +09:00
LICENSE Use https://github.com/actions/typescript-action 2022-11-01 14:58:59 +09:00
package-lock.json Initial commit 2022-11-01 16:07:10 +09:00
package.json Initial commit 2022-11-01 16:07:10 +09:00
README.md Update README.md 2022-11-10 08:41:42 +09:00
tsconfig.json Use https://github.com/actions/typescript-action 2022-11-01 14:58:59 +09:00

GitHub Action: Run Clippy with reviewdog

This action runs Clippy with reviewdog on pull requests to improve code review experience.

スクリーンショット 2022-11-08 8 57 47

Example usage

name: clippy-action
on: [pull_request]
env:
  CARGO_TERM_COLOR: always
jobs:
  clippy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Install latest nightly
      uses: actions-rs/toolchain@v1
      with:
        toolchain: nightly
        override: true
        components: rustfmt, clippy
    - name: clippy-action
      uses: giraffate/clippy-action@main
      with:
        reporter: 'github-pr-review'
        github_token: ${{ secrets.GITHUB_TOKEN }}

Inputs

github_token

Required. Default is ${{ github.token }}.

clippy_flags

Optional. clippy flags. (cargo clippy --color never -q --message-format json <clippy_flags>)

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.

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.