Bless only updated since clippy build

This commit is contained in:
Cameron Steffen
2020-12-31 10:50:00 -06:00
parent ae9ae9713c
commit cbbb188ea9
2 changed files with 40 additions and 10 deletions

View File

@@ -7,8 +7,8 @@ fn main() {
let matches = get_clap_config();
match matches.subcommand() {
("bless", Some(_)) => {
bless::bless();
("bless", Some(matches)) => {
bless::bless(matches.is_present("ignore-timestamp"));
},
("fmt", Some(matches)) => {
fmt::run(matches.is_present("check"), matches.is_present("verbose"));
@@ -47,7 +47,15 @@ fn main() {
fn get_clap_config<'a>() -> ArgMatches<'a> {
App::new("Clippy developer tooling")
.subcommand(SubCommand::with_name("bless").about("bless the test output changes"))
.subcommand(
SubCommand::with_name("bless")
.about("bless the test output changes")
.arg(
Arg::with_name("ignore-timestamp")
.long("ignore-timestamp")
.help("Include files updated before clippy was built"),
),
)
.subcommand(
SubCommand::with_name("fmt")
.about("Run rustfmt on all projects and tests")