about summary refs log tree commit diff
path: root/clippy_dev
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2020-03-31 15:13:38 +0200
committerflip1995 <hello@philkrones.com>2020-03-31 17:24:09 +0200
commitdeb1979b8e36dfc8c651638816ae061144fe58af (patch)
tree19be4f087d4280791d12365164c7b18bd3c7beef /clippy_dev
parent8b9d70d3490698dac74f67a9caad1c5ee825e716 (diff)
downloadrust-deb1979b8e36dfc8c651638816ae061144fe58af.tar.gz
rust-deb1979b8e36dfc8c651638816ae061144fe58af.zip
Make limit_stderr_length a subcommand
Diffstat (limited to 'clippy_dev')
-rw-r--r--clippy_dev/src/main.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/clippy_dev/src/main.rs b/clippy_dev/src/main.rs
index 222658a628b..dadb2d7c04c 100644
--- a/clippy_dev/src/main.rs
+++ b/clippy_dev/src/main.rs
@@ -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();
+        },
         _ => {},
     }
 }