diff options
author | 2022-02-09 18:45:49 +0100 | |
---|---|---|
committer | 2022-02-09 18:49:50 +0100 | |
commit | 10ec36b4434d3ba0426ad427c321067286ebc00c (patch) | |
tree | d0cb499a3c8822feab27463f9698af2476d334d8 | |
parent | b42abe1b4fdba8cb3b027ea12b55e583d3147ea6 (diff) | |
download | rtic-10ec36b4434d3ba0426ad427c321067286ebc00c.tar.gz rtic-10ec36b4434d3ba0426ad427c321067286ebc00c.tar.zst rtic-10ec36b4434d3ba0426ad427c321067286ebc00c.zip |
GHA: Add cargo clippy
-rw-r--r-- | .github/workflows/build.yml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1bc0a71d..f0fac75d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,6 +72,33 @@ jobs: command: check args: --target=${{ matrix.target }} + # Clippy + clippy: + name: Cargo clippy + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install Rust stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: x86_64-unknown-linux-gnu + override: true + + - name: Fail on warnings + run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v1 + + - name: cargo clippy + uses: actions-rs/cargo@v1 + with: + use-cross: false + command: clippy + # Verify all examples, checks checkexamples: name: checkexamples @@ -467,6 +494,7 @@ jobs: needs: - style - check + - clippy - checkexamples - testexamples - checkmacros |