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