Skip to content

Commit

Permalink
cargo-make: Run clippy
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Schaefer <[email protected]>
  • Loading branch information
JohnAZoidberg committed Sep 11, 2023
1 parent 2ca3fb7 commit 2652bf0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,13 @@ jobs:
- name: Setup Rust toolchain
run: rustup show

- run: cargo install cargo-make

- run: |
cargo clippy -p b1display -- --deny=warnings
cargo clippy -p c1minimal -- --deny=warnings
cargo clippy -p ledmatrix -- --deny=warnings
sudo apt-get install -y libudev-dev
cargo make clippy --cwd b1display
cargo make clippy --cwd c1minimal
cargo make clippy --cwd ledmatrix
# fl16-inputmodules/src/serialnum.rs
# is currently used by all firmwares to show their firmware version.
Expand All @@ -107,4 +110,8 @@ jobs:
- name: Setup Rust toolchain
run: rustup show

- run: cargo fmt --all -- --check
- run: |
cargo fmt -p b1display -- --check
cargo fmt -p c1minimal -- --check
cargo fmt -p ledmatrix -- --check
cargo fmt -p fl16-inputmodules -- --check
4 changes: 3 additions & 1 deletion .github/workflows/software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ jobs:
- name: Setup Rust toolchain
run: rustup show

- run: cargo install cargo-make

- name: Run cargo fmt
run: cargo fmt -p inputmodule-control -- --check

- name: Run cargo clippy
run: cargo clippy --target x86_64-unknown-linux-gnu -p inputmodule-control -- -D warnings
run: cargo make clippy --cwd inputmodule-control
1 change: 1 addition & 0 deletions .github/workflows/traditional-cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
cargo clippy -p b1display -- --deny=warnings
cargo clippy -p c1minimal -- --deny=warnings
cargo clippy -p ledmatrix -- --deny=warnings
cargo clippy -p fl16-inputmodules -- --deny=warnings
- name: Software clippy
run: cargo clippy --target x86_64-unknown-linux-gnu -p inputmodule-control -- -D warnings
Expand Down
4 changes: 4 additions & 0 deletions inputmodule-control/Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ extend = "../Makefile.toml"
[env]
TARGET_TRIPLE = "${CARGO_MAKE_RUST_TARGET_TRIPLE}"

# Seems clippy doesn't respect TARGET_TRIPLE
[tasks.clippy]
args = ["clippy", "--target", "${CARGO_MAKE_RUST_TARGET_TRIPLE}", "--", "-Dwarnings"]

[tasks.run]
command = "cargo"
args = [
Expand Down

0 comments on commit 2652bf0

Please sign in to comment.