aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/main.rs')
-rw-r--r--xtask/src/main.rs36
1 files changed, 4 insertions, 32 deletions
diff --git a/xtask/src/main.rs b/xtask/src/main.rs
index 9cefad925..b42946a4c 100644
--- a/xtask/src/main.rs
+++ b/xtask/src/main.rs
@@ -70,42 +70,14 @@ fn main() -> Result<()> {
70 install(opts)? 70 install(opts)?
71 } 71 }
72 "codegen" => { 72 "codegen" => {
73 if matches.contains(["-h", "--help"]) {
74 help::print_no_param_subcommand_help(&subcommand);
75 return Ok(());
76 }
77 codegen::generate_syntax(Mode::Overwrite)?; 73 codegen::generate_syntax(Mode::Overwrite)?;
78 codegen::generate_parser_tests(Mode::Overwrite)?; 74 codegen::generate_parser_tests(Mode::Overwrite)?;
79 codegen::generate_assists_docs(Mode::Overwrite)?; 75 codegen::generate_assists_docs(Mode::Overwrite)?;
80 } 76 }
81 "format" => { 77 "format" => run_rustfmt(Mode::Overwrite)?,
82 if matches.contains(["-h", "--help"]) { 78 "install-pre-commit-hook" => install_pre_commit_hook()?,
83 help::print_no_param_subcommand_help(&subcommand); 79 "lint" => run_clippy()?,
84 return Ok(()); 80 "fuzz-tests" => run_fuzzer()?,
85 }
86 run_rustfmt(Mode::Overwrite)?
87 }
88 "install-pre-commit-hook" => {
89 if matches.contains(["-h", "--help"]) {
90 help::print_no_param_subcommand_help(&subcommand);
91 return Ok(());
92 }
93 install_pre_commit_hook()?
94 }
95 "lint" => {
96 if matches.contains(["-h", "--help"]) {
97 help::print_no_param_subcommand_help(&subcommand);
98 return Ok(());
99 }
100 run_clippy()?
101 }
102 "fuzz-tests" => {
103 if matches.contains(["-h", "--help"]) {
104 help::print_no_param_subcommand_help(&subcommand);
105 return Ok(());
106 }
107 run_fuzzer()?
108 }
109 _ => eprintln!("{}", help::GLOBAL_HELP), 81 _ => eprintln!("{}", help::GLOBAL_HELP),
110 } 82 }
111 Ok(()) 83 Ok(())