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

Add clippy as an optional feature #698

Merged
merged 2 commits into from
Feb 4, 2018
Merged

Add clippy as an optional feature #698

merged 2 commits into from
Feb 4, 2018

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Feb 3, 2018

cc @killercup

5 internet points for whomever who merges it before 14:00 UTC Sunday

@@ -70,7 +73,11 @@ pub fn rustc(

let buf = Arc::new(Mutex::new(vec![]));
let err_buf = buf.clone();
let args = args.to_owned();
let args: Vec<_> = if cfg!(feature = "clippy") {
args.iter().map(|s| s.to_owned()).chain(Some("-Aclippy".to_owned())).collect()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight hackery. Clippy automatically turns certain lints to warn by default. This undoes that. You can reenable them in the code though.

@nrc
Copy link
Member

nrc commented Feb 4, 2018

Cool, looks good! If you could rebase I'll merge asap.

@killercup
Copy link
Member

Oliver, I have a hacked local version of this, but I tust you and will now compile this. Let's see if I can manage to demo it this afternoon or if everything explodes! :)

@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 4, 2018

rebased

@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 4, 2018

Let's see if I can manage to demo it this afternoon or if everything explodes! :)

worst case you'll need to remove the hack with the -Aclippy, but I think it should just work

@nrc nrc merged commit 6a01884 into rust-lang:master Feb 4, 2018
@nrc nrc mentioned this pull request Feb 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants