Thanks to visit codestin.com
Credit goes to github.com

Skip to content

darklajid/clippy-action

 
 

Repository files navigation

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]
jobs:
  clippy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: dtolnay/rust-toolchain@stable
      with:
        components: clippy
    - uses: darklajid/[email protected]
      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-review_warning github-pr-review_error

github-pr-check

cargo clippy cargo clippy -- -Dwarnings
github-pr-check_warning github-pr-check_error

filter_mode

Optional. Filtering mode for the reviewdog command [added, diff_context, file, nofilter]. Default is added.

fail_level

Optional. Minimum issue level for review dog to report failure [none, any, info, warning, error] Default is none.

reviewdog_flags

Optional. Additional reviewdog flags

reviewdog_version

Optional. Install a specific version of reviewdog. By default, the latest version of reviewdog is installed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 65.6%
  • JavaScript 34.4%