Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
paperclip

GitHub Action

rs-clippy-check

v2.0.0

rs-clippy-check

paperclip

rs-clippy-check

Run clippy and annotate the diff with errors and warnings

Installation

Copy and paste the following snippet into your .yml file.

              

- name: rs-clippy-check

uses: clechasseur/[email protected]

Learn more about this action in clechasseur/rs-clippy-check

Choose a version

rs-clippy-check Action

MIT licensed Continuous integration

Clippy lints in your Pull Requests

This GitHub Action executes clippy and posts all lints as annotations for the pushed commit.

Screenshot of a clippy warning displayed in the commit interface of GitHub

This GitHub Action has been forked from actions-rs/clippy-check. The original project published under the name rust-clippy-check. See LICENSE for copyright attribution details.

Example workflow

Note: this workflow uses dtolnay/rust-toolchain to install the most recent nightly clippy.

name: Clippy check

on: push

jobs:
  clippy_check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@nightly
        with:
          components: clippy
      - uses: clechasseur/rs-clippy-check@v2
        with:
          args: --all-features

Inputs

All inputs are optional.

Name Description Type Default
toolchain Rust toolchain to use; override or system default toolchain will be used if omitted string
args Arguments for the cargo clippy command string
use-cross Use cross instead of cargo bool false
working-directory Directory where to perform the cargo clippy command string

For extra details about the toolchain, args and use-cross inputs, see rs-cargo Action.