Skip to content

Commit 151803c

Browse files
committed
Make sure to run all clippy lints at warn level
1 parent 5236fe9 commit 151803c

File tree

1 file changed

+13
-1
lines changed
  • collector/src/compile/execute

1 file changed

+13
-1
lines changed

collector/src/compile/execute/mod.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,21 @@ impl<'a> CargoProcess<'a> {
329329
let mut cmd = self.base_command(self.cwd, cargo_subcommand);
330330
cmd.arg("-p").arg(self.get_pkgid(self.cwd)?);
331331
match self.profile {
332-
Profile::Check | Profile::Clippy => {
332+
Profile::Check => {
333333
cmd.arg("--profile").arg("check");
334334
}
335+
Profile::Clippy => {
336+
cmd.arg("--profile").arg("check");
337+
// Make sure that we run all lints, or else would
338+
// be pointless for allow-by-default lint benchmarks
339+
// and would cause errors with deny-by-default lints.
340+
//
341+
// Note that this takes priority over inherited `-Aclippy::*`s
342+
// and similar.
343+
let mut rustflags = env::var("RUSTFLAGS").unwrap_or_default();
344+
rustflags.push_str(" -Wclippy::all");
345+
cmd.env("RUSTFLAGS", rustflags);
346+
}
335347
Profile::Debug => {}
336348
Profile::Doc => {}
337349
Profile::DocJson => {

0 commit comments

Comments
 (0)