From 1313899d0f98ebe19321159662cc0e6f2258a5ed Mon Sep 17 00:00:00 2001 From: Igor Matuszewski Date: Tue, 31 Oct 2023 23:11:11 +0100 Subject: [PATCH] Deny Clippy warning lints in the CI No need to pass --verbose again, since it can trip sccache up and the info is not that valuable, since it's the last pass in the CI suite. --- crates/infra/cli/src/commands/lint/mod.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/infra/cli/src/commands/lint/mod.rs b/crates/infra/cli/src/commands/lint/mod.rs index c52623435b..7d2b998af0 100644 --- a/crates/infra/cli/src/commands/lint/mod.rs +++ b/crates/infra/cli/src/commands/lint/mod.rs @@ -65,11 +65,13 @@ impl OrderedCommand for LintCommand { } fn run_clippy() -> Result<()> { - Command::new("cargo") - .flag("clippy") - .flag("--") - .flag("--verbose") - .run() + let mut clippy = Command::new("cargo").flag("clippy").flag("--"); + + if GitHub::is_running_in_ci() { + clippy = clippy.property("-D", "warnings"); + } + + clippy.run() } fn run_cargo_fmt() -> Result<()> {