crater: hook into main.rs
This commit is contained in:
parent
5353591b1b
commit
30d85942cf
@ -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<String> = krates
|
||||
let _clippy_lint_results: Vec<String> = krates
|
||||
.into_iter()
|
||||
.map(|krate| krate.download_and_extract())
|
||||
.map(|krate| krate.run_clippy_lints())
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user