Skip to content

About

๐Ÿ“Ž GitHub Action for PR annotations with Rust clippy warnings

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

15 stars

Watchers

1 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
ย 
ย 

Latest commit

ย 

History

346 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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 1.

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 actions-rust-lang/setup-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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
      - uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
        with:
          toolchain: nightly
          components: clippy
      - uses: clechasseur/rs-clippy-check@v6.1.1
        with:
          args: --all-features

Inputs

All inputs are optional.

Name Required Description Type Default
toolchain Rust toolchain name to use string
args Arguments for the cargo clippy command string
working-directory Directory where to perform the cargo clippy command string
tool Tool to use instead of cargo (ex: cross, cargo-hack) string
cache-key Cache key when using a non-cargo tool string rs-clippy-check

For extra details about the toolchain, args, tool and cache-key inputs, see rs-cargo Action.

Release immutability

Starting with release 6.0.0, this GitHub action's releases will be marked as immutable. This means that once a release is created, its tag cannot be modified in any way.

Previously, best practices for using GitHub actions in workflows were to pin the actions to a specific Git commit hash. With immutable releases, this is no longer necessary and the actual Git tag is safe to use. Because of this, starting with release 6.0.0, this GitHub action will no longer provide a floating major version tag (like v6, for example). To use a specific version of this action, pin it to the release tag (like v6.0.0).

Notes

1 : Currently, GitHub sets a limit of 10 annotations of each type per run (see this page for more information). So if there are more than 10 such lints of one type reported by clippy, only the first 10 will appear as PR annotations. The other lints will still appear in the check run summary (see this one for example).

About

๐Ÿ“Ž GitHub Action for PR annotations with Rust clippy warnings

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

15 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages