CI: Add Rust lints

This commit is contained in:
Jack Grigg 2021-07-14 23:06:44 +01:00
parent b54b416d68
commit 4026386cac
1 changed files with 32 additions and 0 deletions

View File

@ -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