CI: Add Rust lints
This commit is contained in:
parent
b54b416d68
commit
4026386cac
|
@ -52,3 +52,35 @@ jobs:
|
||||||
- name: Whitespace
|
- name: Whitespace
|
||||||
run: ./test/lint/lint-whitespace.sh
|
run: ./test/lint/lint-whitespace.sh
|
||||||
if: always()
|
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
|
||||||
|
|
Loading…
Reference in New Issue