Skip to content

Commit cef882c

Browse files
committed
Auto merge of rust-lang#8731 - Alexendoo:dogfood-allow-unknown-lints, r=xFrednet
dogfood: allow unknown lints when not running with `internal` feature changelog: none https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/unknown.20lint.20in.20test.20dogfood_clippy It's only a warning so this wasn't causing the test to fail, but if you had another error somewhere or used `--nocapture` the extra warnings would be shown
2 parents ed22428 + a96bc7a commit cef882c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/dogfood.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,13 @@ fn run_clippy_for_package(project: &str) {
8080
.args(&["-D", "clippy::pedantic"])
8181
.arg("-Cdebuginfo=0"); // disable debuginfo to generate less data in the target dir
8282

83-
// internal lints only exist if we build with the internal feature
8483
if cfg!(feature = "internal") {
84+
// internal lints only exist if we build with the internal feature
8585
command.args(&["-D", "clippy::internal"]);
86+
} else {
87+
// running a clippy built without internal lints on the clippy source
88+
// that contains e.g. `allow(clippy::invalid_paths)`
89+
command.args(&["-A", "unknown_lints"]);
8690
}
8791

8892
let output = command.output().unwrap();

0 commit comments

Comments
 (0)