Skip to content

Commit 2652bf0

Browse files
committed
cargo-make: Run clippy
Signed-off-by: Daniel Schaefer <[email protected]>
1 parent 2ca3fb7 commit 2652bf0

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

.github/workflows/firmware.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,13 @@ jobs:
8181
- name: Setup Rust toolchain
8282
run: rustup show
8383

84+
- run: cargo install cargo-make
85+
8486
- run: |
85-
cargo clippy -p b1display -- --deny=warnings
86-
cargo clippy -p c1minimal -- --deny=warnings
87-
cargo clippy -p ledmatrix -- --deny=warnings
87+
sudo apt-get install -y libudev-dev
88+
cargo make clippy --cwd b1display
89+
cargo make clippy --cwd c1minimal
90+
cargo make clippy --cwd ledmatrix
8891
8992
# fl16-inputmodules/src/serialnum.rs
9093
# is currently used by all firmwares to show their firmware version.
@@ -107,4 +110,8 @@ jobs:
107110
- name: Setup Rust toolchain
108111
run: rustup show
109112

110-
- run: cargo fmt --all -- --check
113+
- run: |
114+
cargo fmt -p b1display -- --check
115+
cargo fmt -p c1minimal -- --check
116+
cargo fmt -p ledmatrix -- --check
117+
cargo fmt -p fl16-inputmodules -- --check

.github/workflows/software.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,10 @@ jobs:
129129
- name: Setup Rust toolchain
130130
run: rustup show
131131

132+
- run: cargo install cargo-make
133+
132134
- name: Run cargo fmt
133135
run: cargo fmt -p inputmodule-control -- --check
134136

135137
- name: Run cargo clippy
136-
run: cargo clippy --target x86_64-unknown-linux-gnu -p inputmodule-control -- -D warnings
138+
run: cargo make clippy --cwd inputmodule-control

.github/workflows/traditional-cargo.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ jobs:
9191
cargo clippy -p b1display -- --deny=warnings
9292
cargo clippy -p c1minimal -- --deny=warnings
9393
cargo clippy -p ledmatrix -- --deny=warnings
94+
cargo clippy -p fl16-inputmodules -- --deny=warnings
9495
9596
- name: Software clippy
9697
run: cargo clippy --target x86_64-unknown-linux-gnu -p inputmodule-control -- -D warnings

inputmodule-control/Makefile.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ extend = "../Makefile.toml"
44
[env]
55
TARGET_TRIPLE = "${CARGO_MAKE_RUST_TARGET_TRIPLE}"
66

7+
# Seems clippy doesn't respect TARGET_TRIPLE
8+
[tasks.clippy]
9+
args = ["clippy", "--target", "${CARGO_MAKE_RUST_TARGET_TRIPLE}", "--", "-Dwarnings"]
10+
711
[tasks.run]
812
command = "cargo"
913
args = [

0 commit comments

Comments
 (0)