diff options
Diffstat (limited to 'crates/tools/src/main.rs')
-rw-r--r-- | crates/tools/src/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/tools/src/main.rs b/crates/tools/src/main.rs index 7edf8f52d..9d73d57c4 100644 --- a/crates/tools/src/main.rs +++ b/crates/tools/src/main.rs | |||
@@ -7,7 +7,10 @@ use std::{ | |||
7 | use clap::{App, Arg, SubCommand}; | 7 | use clap::{App, Arg, SubCommand}; |
8 | use failure::bail; | 8 | use failure::bail; |
9 | 9 | ||
10 | use tools::{collect_tests, generate, install_format_hook, run, run_rustfmt, Mode, Overwrite, Result, Test, Verify, project_root}; | 10 | use tools::{ |
11 | collect_tests, generate,install_format_hook, run, run_rustfmt, | ||
12 | Mode, Overwrite, Result, Test, Verify, project_root, run_fuzzer | ||
13 | }; | ||
11 | 14 | ||
12 | const GRAMMAR_DIR: &str = "crates/ra_syntax/src/grammar"; | 15 | const GRAMMAR_DIR: &str = "crates/ra_syntax/src/grammar"; |
13 | const OK_INLINE_TESTS_DIR: &str = "crates/ra_syntax/tests/data/parser/inline/ok"; | 16 | const OK_INLINE_TESTS_DIR: &str = "crates/ra_syntax/tests/data/parser/inline/ok"; |
@@ -27,6 +30,7 @@ fn main() -> Result<()> { | |||
27 | .subcommand(SubCommand::with_name("install-code")) | 30 | .subcommand(SubCommand::with_name("install-code")) |
28 | .subcommand(SubCommand::with_name("format")) | 31 | .subcommand(SubCommand::with_name("format")) |
29 | .subcommand(SubCommand::with_name("format-hook")) | 32 | .subcommand(SubCommand::with_name("format-hook")) |
33 | .subcommand(SubCommand::with_name("fuzz-tests")) | ||
30 | .get_matches(); | 34 | .get_matches(); |
31 | let mode = if matches.is_present("verify") { | 35 | let mode = if matches.is_present("verify") { |
32 | Verify | 36 | Verify |
@@ -42,6 +46,7 @@ fn main() -> Result<()> { | |||
42 | "gen-syntax" => generate(Overwrite)?, | 46 | "gen-syntax" => generate(Overwrite)?, |
43 | "format" => run_rustfmt(mode)?, | 47 | "format" => run_rustfmt(mode)?, |
44 | "format-hook" => install_format_hook()?, | 48 | "format-hook" => install_format_hook()?, |
49 | "fuzz-tests" => run_fuzzer()?, | ||
45 | _ => unreachable!(), | 50 | _ => unreachable!(), |
46 | } | 51 | } |
47 | Ok(()) | 52 | Ok(()) |