Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Fix Clippy opt-in with tool lints
Browse files Browse the repository at this point in the history
It seems that rustc doesn't handle `-Aclippy::all` and needs for the
tool lint to be separated (`-A clippy::all`)
  • Loading branch information
Xanewok committed Sep 4, 2018
1 parent 397561f commit cf6358a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/build/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ crate fn rustc(
let mut clippy_args = vec!["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()];

if clippy_pref == ClippyPreference::OptIn {
// `OptIn`: allow clippy require `#![warn(clippy)]` override in each workspace crate
clippy_args.push("-Aclippy".to_owned());
// `OptIn`: Require explicit `#![warn(clippy::all)]` annotation in each workspace crate
clippy_args.push("-A".to_owned());
clippy_args.push("clippy::all".to_owned());
}

args.iter()
Expand Down

0 comments on commit cf6358a

Please sign in to comment.