Skip to content

Commit c3c68c0

Browse files
alanzmeta-codesync[bot]
authored andcommitted
BE: Improve order of elp --help output
Summary: As title. Attempts to group the available options Reviewed By: jcpetruzza Differential Revision: D85767261 fbshipit-source-id: c5ae95b6fa45a1637666804c77c587b30dd4abc8
1 parent 9d86159 commit c3c68c0

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

crates/elp/src/bin/args.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,8 @@ pub fn command() -> impl Parser<Command> {
525525
.map(Command::EqwalizeStats)
526526
.to_options()
527527
.command("eqwalize-stats")
528-
.help("Return statistics about code quality for eqWAlizer");
528+
.help("Return statistics about code quality for eqWAlizer")
529+
.hide();
529530

530531
let dialyze_all = dialyze_all()
531532
.map(Command::DialyzeAll)
@@ -601,24 +602,25 @@ pub fn command() -> impl Parser<Command> {
601602
.help("Dump a JSON config stanza suitable for use in VS Code project.json");
602603

603604
construct!([
605+
// Note: The order here is what is used for `elp --help` output
606+
version,
607+
run_server,
608+
shell,
604609
eqwalize,
605610
eqwalize_all,
606611
eqwalize_app,
607612
eqwalize_target,
613+
eqwalize_stats,
608614
dialyze_all,
609615
lint,
610616
ssr,
611-
run_server,
612-
generate_completions,
613617
parse_all,
614618
parse_elp,
615-
build_info,
616-
version,
617-
shell,
618-
eqwalize_stats,
619619
explain,
620+
build_info,
620621
project_info,
621622
glean,
623+
generate_completions,
622624
config_stanza,
623625
])
624626
.fallback(Help())

crates/elp/src/resources/test/help.stdout

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,21 @@ Available options:
1010
-h, --help Prints help information
1111

1212
Available commands:
13+
version Print version
14+
server Run lsp server
15+
shell Starts an interactive ELP shell
1316
eqwalize Eqwalize specified module
1417
eqwalize-all Eqwalize all opted-in modules in a project
1518
eqwalize-app Eqwalize all opted-in modules in specified application
1619
eqwalize-target Eqwalize all opted-in modules in specified buck target
1720
dialyze-all Run Dialyzer on the whole project by shelling out to a `dialyzer-run` tool on the path to do the legwork.
1821
lint Parse files in project and emit diagnostics, optionally apply fixes.
1922
ssr Run SSR (Structural Search and Replace) pattern matching on project files.
20-
server Run lsp server
21-
generate-completions Generate shell completions
2223
parse-all Dump ast for all files in a project for specified rebar.config file
2324
parse-elp Tree-sitter parse all files in a project for specified rebar.config file
24-
build-info Generate build info JSON file
25-
version Print version
26-
shell Starts an interactive ELP shell
27-
eqwalize-stats Return statistics about code quality for eqWAlizer
2825
explain Explain a diagnostic code
26+
build-info Generate build info JSON file
2927
project-info Generate project info file
3028
glean Glean indexer
29+
generate-completions Generate shell completions
3130
config Dump a JSON config stanza suitable for use in VS Code project.json

0 commit comments

Comments
 (0)