Skip to content

Latest commit

 

History

History
100 lines (81 loc) · 5.19 KB

README.md

File metadata and controls

100 lines (81 loc) · 5.19 KB

GitHub Action - rust-clippy-reborn

GitHub Continuous integration CodeQL Dependabot enabled GitHub contributors Codecov GitHub release (with filter) GitHub issues GitHub closed issues GitHub last commit (branch) Snyk Security Depfu Depfu Depfu Static Badge Code Climate maintainability Code Climate technical debt Code Climate issues Public workflows that use this action GitHub Marketplace

Clippy lints in your commits and Pull Requests

Screenshot

Table of Contents

Motivation

This is a next gen version of actions-rs/clippy-check 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 using the toolchain action 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: crusty-pie/toolchain@v1
        with:
          toolchain: nightly
          components: clippy
          override: true
      - uses: crusty-pie/clippy@v1
        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: crusty-pie/toolchain@v1
        with:
          toolchain: stable
          components: clippy
      - uses: crusty-pie/clippy@v1
        with:
          args: --all-features --all-targets

Inputs

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

Contribute and support

Any contributions are welcomed!

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