ITADN
actions-rs-plus/clippy-check
README.md

Rust clippy-check Action

MIT licensed GitHub Discussions Build codecov

Clippy lints in your Pull Requests

This GitHub Action executes clippy and posts all lints as annotations for the pushed commit, as in the live example here.

Screenshot

Example workflow

This example is utilizing toolchain Actions to install the most recent nightly clippy version.

on: push
name: Clippy check
jobs:
  clippy_check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly
          components: clippy
          override: true
      - uses: actions-rs-plus/clippy-check@ca09b7b0955125d97749648eed836a9100ec25f4 # v2.6.0
        with:
          args: --all-features

With stable clippy

on: push
name: Clippy check
jobs:
  clippy_check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
      - run: rustup component add clippy
      - uses: actions-rs-plus/clippy-check@ca09b7b0955125d97749648eed836a9100ec25f4 # v2.6.0
        with:
          args: --all-features

Inputs

NameRequiredDescriptionTypeDefault
toolchainRust toolchain to use; override or system default toolchain will be used if omittedstring
argsArguments for the cargo clippy commandstring
use-crossUse cross instead of cargoboolfalse
working-directorySpecify where rust directory isstring.

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

Limitations

The sky