Skip to content

Commit d7d0647

Browse files
authored
Merge pull request #2164 from blyxyas/run-all-clippy-lints
Make sure to run all clippy lints at warn level
2 parents e58b49a + 151803c commit d7d0647

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)