From 668b37af5ce7dbc6e5a782c95683210dc0363c34 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 23 Jun 2022 14:07:02 +1000 Subject: [PATCH] Enable clippy on CI Add a clippy configuration file configuring the MSRV. Add a github actions job to run clippy on CI. Please note the job does _not_ use `--all-targets` because doing so causes: ``` error[E0554]: `#![feature]` may not be used on the stable release channel --> src/lib.rs:46:54 | 46 | #![cfg_attr(all(test, feature = "unstable"), feature(test))] ``` --- .github/workflows/rust.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8d37c2f1..41733534 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -107,3 +107,18 @@ jobs: CARGO_TARGET_THUMBV7M_NONE_EABI_RUNNER: "qemu-system-arm -cpu cortex-m3 -machine mps2-an385 -nographic -semihosting-config enable=on,target=native -kernel" run: cd embedded && cargo run --target thumbv7m-none-eabi + Clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - run: rustup component add clippy + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all-features -- -D warnings