diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index 264b326a5..d97c4722c 100644 --- a/.github/workflows/lints.yml +++ b/.github/workflows/lints.yml @@ -52,3 +52,35 @@ jobs: - name: Whitespace run: ./test/lint/lint-whitespace.sh if: always() + + rust-clippy: + name: Clippy (1.51.0) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.51.0 + components: clippy + override: true + - name: Run clippy + uses: actions-rs/clippy-check@v1 + with: + name: Clippy (1.51.0) + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features --all-targets -- -D warnings + + rustfmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.51.0 + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: -- --check