From 4970075974f607979f7764e4e1309a256d7ad005 Mon Sep 17 00:00:00 2001 From: Hmvp Date: Mon, 26 Jul 2021 11:48:11 +0200 Subject: [PATCH] Also clippy check examples --- .github/workflows/clippy.yml | 4 +++- rp2040-hal/examples/i2c.rs | 1 + rp2040-hal/examples/lcd_display.rs | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 1df2085..22a6b02 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -7,6 +7,8 @@ jobs: RUSTFLAGS: "-D warnings" steps: - uses: actions/checkout@v2 + - run: sudo apt-get update + - run: sudo apt-get install gcc-arm-none-eabi - uses: actions-rs/toolchain@v1 with: toolchain: stable @@ -17,4 +19,4 @@ jobs: - uses: actions-rs/cargo@v1 with: command: clippy - args: -- -Dwarnings + args: --workspace --examples -- -Dwarnings diff --git a/rp2040-hal/examples/i2c.rs b/rp2040-hal/examples/i2c.rs index 7d25f86..18c9f91 100644 --- a/rp2040-hal/examples/i2c.rs +++ b/rp2040-hal/examples/i2c.rs @@ -44,5 +44,6 @@ fn main() -> ! { i2c.write(0x2c, &[1, 2, 3]).unwrap(); + #[allow(clippy::empty_loop)] loop {} } diff --git a/rp2040-hal/examples/lcd_display.rs b/rp2040-hal/examples/lcd_display.rs index 840997d..f508c55 100644 --- a/rp2040-hal/examples/lcd_display.rs +++ b/rp2040-hal/examples/lcd_display.rs @@ -48,5 +48,6 @@ fn main() -> ! { .unwrap(); lcd.write_str("HD44780!", &mut delay_provider).unwrap(); + #[allow(clippy::empty_loop)] loop {} }