Merge pull request #217 from gwilymk/run-clippy-on-examples-and-tests

Run clippy on examples and tests
This commit is contained in:
Gwilym Kuiper 2022-04-23 21:08:16 +01:00 committed by GitHub
commit b78b888ce3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -6,5 +6,5 @@ build-std-features = ["compiler-builtins-mem"]
target = "thumbv4t-none-eabi"
[target.thumbv4t-none-eabi]
rustflags = ["-Clink-arg=-Tgba.ld", "-Ctarget-cpu=arm7tdmi", "-Dwarnings", "-Dclippy::all"]
rustflags = ["-Clink-arg=-Tgba.ld", "-Ctarget-cpu=arm7tdmi", "-Dwarnings", "-Dclippy::all", "-Aclippy::empty-loop"]
runner = "mgba-test-runner"

View file

@ -24,7 +24,7 @@ fn main(mut gba: agb::Gba) -> ! {
let mut value = 0;
for j in 0..4 {
value |= (value << 8) | (x + i) % 8 | ((y + j) % 8) << 4;
value |= (value << 8) | ((x + i) % 8) | ((y + j) % 8) << 4;
}
*bit = value;

View file

@ -87,7 +87,7 @@ _test-debug crate:
just _build-debug {{crate}}
(cd "{{crate}}" && cargo test)
_clippy crate:
{{ if crate =~ 'agb.*' { "cd " + crate + " && cargo clippy" } else { "" } }}
(cd "{{crate}}" && cargo clippy --examples --tests)
_clean crate:
(cd "{{crate}}" && cargo clean)