Skip to content

Commit 08e9f88

Browse files
Merge pull request #73 from FrameworkComputer/cargo-make-clippy
2 parents 1710ff1 + 2652bf0 commit 08e9f88

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
@@ -90,10 +90,13 @@ jobs:
9090
- name: Setup Rust toolchain
9191
run: rustup show
9292

93+
- run: cargo install cargo-make
94+
9395
- run: |
94-
cargo clippy -p b1display -- --deny=warnings
95-
cargo clippy -p c1minimal -- --deny=warnings
96-
cargo clippy -p ledmatrix -- --deny=warnings
96+
sudo apt-get install -y libudev-dev
97+
cargo make clippy --cwd b1display
98+
cargo make clippy --cwd c1minimal
99+
cargo make clippy --cwd ledmatrix
97100
98101
# fl16-inputmodules/src/serialnum.rs
99102
# is currently used by all firmwares to show their firmware version.
@@ -116,4 +119,8 @@ jobs:
116119
- name: Setup Rust toolchain
117120
run: rustup show
118121

119-
- run: cargo fmt --all -- --check
122+
- run: |
123+
cargo fmt -p b1display -- --check
124+
cargo fmt -p c1minimal -- --check
125+
cargo fmt -p ledmatrix -- --check
126+
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
@@ -92,6 +92,7 @@ jobs:
9292
cargo clippy -p b1display -- --deny=warnings
9393
cargo clippy -p c1minimal -- --deny=warnings
9494
cargo clippy -p ledmatrix -- --deny=warnings
95+
cargo clippy -p fl16-inputmodules -- --deny=warnings
9596
9697
- name: Software clippy
9798
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)