mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
refactor(args): Switch to pico-args in ra_tools
This commit is contained in:
parent
735845d86e
commit
4e94c46713
5 changed files with 153 additions and 59 deletions
56
crates/ra_tools/src/help.rs
Normal file
56
crates/ra_tools/src/help.rs
Normal file
|
@ -0,0 +1,56 @@
|
|||
pub fn print_global_help() {
|
||||
println!(
|
||||
"tasks
|
||||
|
||||
USAGE:
|
||||
ra_tools <SUBCOMMAND>
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information
|
||||
|
||||
SUBCOMMANDS:
|
||||
format
|
||||
format-hook
|
||||
fuzz-tests
|
||||
gen-syntax
|
||||
gen-tests
|
||||
install-ra
|
||||
lint"
|
||||
)
|
||||
}
|
||||
|
||||
pub fn print_install_ra_help() {
|
||||
println!(
|
||||
"ra_tools-install-ra
|
||||
|
||||
USAGE:
|
||||
ra_tools.exe install-ra [FLAGS]
|
||||
|
||||
FLAGS:
|
||||
--client-code
|
||||
-h, --help Prints help information
|
||||
--jemalloc
|
||||
--server"
|
||||
)
|
||||
}
|
||||
|
||||
pub fn print_no_param_subcommand_help(subcommand: &str) {
|
||||
println!(
|
||||
"ra_tools-{}
|
||||
|
||||
USAGE:
|
||||
ra_tools {}
|
||||
|
||||
FLAGS:
|
||||
-h, --help Prints help information",
|
||||
subcommand, subcommand
|
||||
);
|
||||
}
|
||||
|
||||
pub fn print_install_ra_conflict() {
|
||||
println!(
|
||||
"error: The argument `--server` cannot be used with `--client-code`
|
||||
|
||||
For more information try --help"
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue