Git Product home page Git Product logo

clippy-action's Introduction

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: 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-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_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.

clippy-action's People

Contributors

giraffate avatar dependabot[bot] avatar johntitor avatar

Stargazers

Nikola Hristov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.