diff --git a/clippy_dev/src/crater.rs b/clippy_dev/src/crater.rs index 22b04242885..1cf12941c35 100644 --- a/clippy_dev/src/crater.rs +++ b/clippy_dev/src/crater.rs @@ -69,7 +69,7 @@ fn build_clippy() { } // the main fn -pub(crate) fn run() { +pub fn run() { let cargo_clippy_path: PathBuf = PathBuf::from("target/debug/cargo-clippy"); let clippy_driver_path: PathBuf = PathBuf::from("target/debug/cargo-driver"); @@ -88,7 +88,7 @@ pub(crate) fn run() { ); // download and extract the crates, then run clippy on them and collect clippys warnings - let clippy_lint_results: Vec = krates + let _clippy_lint_results: Vec = krates .into_iter() .map(|krate| krate.download_and_extract()) .map(|krate| krate.run_clippy_lints()) diff --git a/clippy_dev/src/main.rs b/clippy_dev/src/main.rs index 2ea56c42faf..6fb8b6f2899 100644 --- a/clippy_dev/src/main.rs +++ b/clippy_dev/src/main.rs @@ -1,7 +1,7 @@ #![cfg_attr(feature = "deny-warnings", deny(warnings))] use clap::{App, Arg, ArgMatches, SubCommand}; -use clippy_dev::{bless, fmt, new_lint, ra_setup, serve, stderr_length_check, update_lints}; +use clippy_dev::{bless, crater, fmt, new_lint, ra_setup, serve, stderr_length_check, update_lints}; fn main() { let matches = get_clap_config(); @@ -10,6 +10,9 @@ fn main() { ("bless", Some(matches)) => { bless::bless(matches.is_present("ignore-timestamp")); }, + ("crater", Some(_)) => { + crater::run(); + }, ("fmt", Some(matches)) => { fmt::run(matches.is_present("check"), matches.is_present("verbose")); }, @@ -56,6 +59,7 @@ fn get_clap_config<'a>() -> ArgMatches<'a> { .help("Include files updated before clippy was built"), ), ) + .subcommand(SubCommand::with_name("crater").about("run clippy on a set of crates and check output")) .subcommand( SubCommand::with_name("fmt") .about("Run rustfmt on all projects and tests")