From 822d8b7bc03eeeb016a1196e062a0da122ebfc01 Mon Sep 17 00:00:00 2001 From: Harrison Burt <57491488+ChillFish8@users.noreply.github.com> Date: Sat, 20 Nov 2021 17:50:42 +0000 Subject: [PATCH] Update lint.yml --- .github/workflows/lint.yml | 50 +++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ef98799a..bcb45409 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,32 +1,44 @@ -name: Rust +name: Lint on: push: branches: [ master ] pull_request: - branches: [ master ] - -env: - CARGO_TERM_COLOR: always + types: [ opened, synchronize, reopened ] jobs: - build: - + fmt: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 - - name: Install latest nightly + + - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: nightly - override: true - components: rustfmt, clippy - - - uses: actions/checkout@v2 - - name: Run Lint - run: cargo +nightly fmt -- --check - + toolchain: nightly + profile: minimal + components: rustfmt + override: true + - name: Rustfmt Check + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + runs-on: ubuntu-latest + steps: - uses: actions/checkout@v2 - - name: Run Clippy - run: cargo clippy -- -D warnings + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + profile: minimal + components: clippy + override: true + - name: Clippy Check + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --workspace --all-features --tests --examples --bins -- -Dclippy::todo