GithubHelp home page GithubHelp logo

isabella232 / clippy-check Goto Github PK

View Code? Open in Web Editor NEW

This project forked from actions-rs/clippy-check

0.0 0.0 0.0 2.18 MB

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

Home Page: https://github.com/marketplace/actions/rust-clippy-check

License: MIT License

JavaScript 1.44% TypeScript 98.56%

clippy-check's Introduction

Rust clippy-check Action

MIT licensed Gitter

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@v1
      - uses: actions-rs/toolchain@v1
        with:
            toolchain: nightly
            components: clippy
            override: true
      - uses: actions-rs/clippy-check@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          args: --all-features

With stable clippy

on: push
name: Clippy check
jobs:
  clippy_check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - run: rustup component add clippy
      - uses: actions-rs/clippy-check@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          args: --all-features

Inputs

Name Required Description Type Default
token โœ“ GitHub secret token, usually a ${{ secrets.GITHUB_TOKEN }} string
toolchain Rust toolchain to use; override or system default toolchain will be used if omitted string
args Arguments for the cargo clippy command string
use-cross Use cross instead of cargo bool false
name Name of the created GitHub check. If running this action multiple times, each run must have a unique name. string clippy

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

NOTE: if your workflow contains multiple instances of the clippy-check action you will need to give each invocation a unique name, using the name property described above. Check runs must have a unique name, and this prevents a later check run overriding a previous one within the same workflow.

Limitations

Due to token permissions, this Action WILL NOT be able to post clippy annotations for Pull Requests from the forked repositories.

This is a pretty big problem, which can be solved only by Github themselves, see #2 for details.
As a fallback this Action will output all clippy messages into the stdout and fail the result correspondingly.

clippy-check's People

Contributors

dbalcomb avatar dependabot-preview[bot] avatar freebroccolo avatar garyttierney avatar johntitor avatar svartalf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.