mirror of https://github.com/rust-lang/rust.git
Make limit_stderr_length a subcommand
This commit is contained in:
parent
8b9d70d349
commit
deb1979b8e
|
@ -38,8 +38,8 @@ jobs:
|
||||||
run: cargo build --features deny-warnings
|
run: cargo build --features deny-warnings
|
||||||
working-directory: clippy_dev
|
working-directory: clippy_dev
|
||||||
|
|
||||||
- name: Test limit-stderr-length
|
- name: Test limit_stderr_length
|
||||||
run: cargo dev --limit-stderr-length
|
run: cargo dev limit_stderr_length
|
||||||
|
|
||||||
- name: Test update_lints
|
- name: Test update_lints
|
||||||
run: cargo dev update_lints --check
|
run: cargo dev update_lints --check
|
||||||
|
|
|
@ -95,17 +95,12 @@ fn main() {
|
||||||
.takes_value(true),
|
.takes_value(true),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.arg(
|
.subcommand(
|
||||||
Arg::with_name("limit-stderr-length")
|
SubCommand::with_name("limit_stderr_length")
|
||||||
.long("limit-stderr-length")
|
.about("Ensures that stderr files do not grow longer than a certain amount of lines."),
|
||||||
.help("Ensures that stderr files do not grow longer than a certain amount of lines."),
|
|
||||||
)
|
)
|
||||||
.get_matches();
|
.get_matches();
|
||||||
|
|
||||||
if matches.is_present("limit-stderr-length") {
|
|
||||||
stderr_length_check::check();
|
|
||||||
}
|
|
||||||
|
|
||||||
match matches.subcommand() {
|
match matches.subcommand() {
|
||||||
("fmt", Some(matches)) => {
|
("fmt", Some(matches)) => {
|
||||||
fmt::run(matches.is_present("check"), matches.is_present("verbose"));
|
fmt::run(matches.is_present("check"), matches.is_present("verbose"));
|
||||||
|
@ -129,6 +124,9 @@ fn main() {
|
||||||
Err(e) => eprintln!("Unable to create lint: {}", e),
|
Err(e) => eprintln!("Unable to create lint: {}", e),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
("limit_stderr_length", _) => {
|
||||||
|
stderr_length_check::check();
|
||||||
|
},
|
||||||
_ => {},
|
_ => {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue