Clippy lints in your commits and Pull Requests
Table of Contents
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:
GITHUB_TOKEN
secret is not required anymore, using this Action is much safer in terms of security- It works correctly for Pull Requests created from forked repositories
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
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
Name | Required | Description | Type | Default |
---|---|---|---|---|
args |
Arguments for the cargo clippy command |
string |
This Action is distributed under the terms of the MIT license, see LICENSE for details.
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.