Skip to content

Commit

Permalink
refactor(xtask): extract clippy base
Browse files Browse the repository at this point in the history
  • Loading branch information
mkroening committed Jan 2, 2025
1 parent e008eaa commit 6d79f62
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions xtask/src/clippy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,38 @@ impl Clippy {
arch.install()?;

let triple = arch.triple();
cmd!(sh, "cargo clippy --target={triple}").run()?;
cmd!(sh, "cargo clippy --target={triple} --features common-os").run()?;
cmd!(sh, "cargo clippy --target={triple}")
let clippy = || cmd!(sh, "cargo clippy --target={triple}");

clippy().run()?;
clippy().arg("--features=common-os").run()?;
clippy()
.arg("--features=acpi,dns,fsgsbase,pci,smp,vga")
.run()?;
cmd!(sh, "cargo clippy --target={triple}")
.arg("--no-default-features")
.run()?;
cmd!(sh, "cargo clippy --target={triple}")
.arg("--all-features")
.run()?;
cmd!(sh, "cargo clippy --target={triple}")
clippy().arg("--no-default-features").run()?;
clippy().arg("--all-features").run()?;
clippy()
.arg("--no-default-features")
.arg("--features=tcp")
.run()?;
cmd!(sh, "cargo clippy --target={triple}")
clippy()
.arg("--no-default-features")
.arg("--features=acpi,fsgsbase,pci,smp,vga")
.run()?;

match *arch {
Arch::X86_64 => {
cmd!(sh, "cargo clippy --target={triple}")
.arg("--features=shell")
.run()?;
clippy().arg("--features=shell").run()?;
}
Arch::Aarch64 => {}
Arch::Riscv64 => {
cmd!(sh, "cargo clippy --target={triple}")
clippy()
.arg("--no-default-features")
.arg("--features=gem-net,tcp")
.run()?;
}
}

cmd!(sh, "cargo clippy --target={triple}")
clippy()
.arg("--no-default-features")
.arg("--features=acpi,fsgsbase,newlib,smp,vga")
.run()?;
Expand Down

0 comments on commit 6d79f62

Please sign in to comment.