Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

actions-rs/clippy

Repository files navigation

Rust clippy Action

Sponsoring MIT licensed Gitter Continuous integration Dependabot enabled

Clippy lints in your commits and Pull Requests

Table of Contents

Motivation

This is a next gen version of actions-rs/clippy-check Action and it's in an unstable state right now, as it uses unstable/undocumented GitHub Actions features and potentially can break at any time.

Compared to actions-rs/clippy-check it has few advantages:

  1. GITHUB_TOKEN secret is not required anymore, using this Action is much safer in terms of security
  2. It works correctly for Pull Requests created from forked repositories

Example workflow

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

on: [push, pull_request]
name: Clippy
jobs:
  clippy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions-rs/toolchain@v1
        with:
            toolchain: nightly
            components: clippy
            override: true
      # Note that there is no release tag available yet
      # and the following code will use master branch HEAD
      # all the time.
      - uses: actions-rs/clippy@master
        with:
          args: --all-features --all-targets

With stable clippy

on: [push, pull_request]
name: Clippy
jobs:
  clippy_check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions-rs/toolchain@v1
        with:
            toolchain: stable
            components: clippy
      - uses: actions-rs/clippy@master
        with:
          args: --all-features --all-targets

Inputs

Inputs

Name Required Description Type Default
args Arguments for the cargo clippy command string

License

This Action is distributed under the terms of the MIT license, see LICENSE for details.

Contribute and support

Any contributions are welcomed!

If you want to report a bug or have a feature request, check the Contributing guide.

You can also support author by funding the ongoing project work, see Sponsoring.