Skip to content

Commit 7271f92

Browse files
idodeclareVladimir Kotal
authored andcommitted
Fix alphabetical ordering of options. Tweak spacing.
1 parent ad0278b commit 7271f92

File tree

1 file changed

+14
-12
lines changed
  • opengrok-indexer/src/main/java/org/opengrok/indexer/index

1 file changed

+14
-12
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/index/Indexer.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,11 @@ public static void main(String[] argv) {
155155
helpStream.println(helpUsage);
156156
if (help > 1) {
157157
helpStream.println(AnalyzerGuruHelp.getUsage());
158-
helpStream.println(ConfigurationHelp.getSamples());
158+
helpStream.print(ConfigurationHelp.getSamples());
159159
}
160160
if (help > 2) {
161+
helpStream.println("Ctags command-line:");
162+
helpStream.println();
161163
helpStream.println(getCtagsCommand());
162164
}
163165
System.exit(status);
@@ -423,7 +425,7 @@ public static String[] parseOptions(String[] argv) throws ParseException {
423425

424426
parser.on(HELP_OPT_3, Indexer.HELP_OPT_2, HELP_OPT_1,
425427
"Display this usage summary.",
426-
" Repeat once for configuration.xml samples.",
428+
" Repeat once for AnalyzerGuru details and configuration.xml samples.",
427429
" Repeat twice for ctags command-line.").Do(v -> {
428430
++help;
429431
helpUsage = parser.getUsage();
@@ -649,12 +651,6 @@ public static String[] parseOptions(String[] argv) throws ParseException {
649651
LoggerUtil.setBaseConsoleLogLevel(Level.WARNING);
650652
});
651653

652-
parser.on("--repository", "=path/to/repository",
653-
"Path (relative to the source root) to a repository for generating",
654-
"history (if -H,--history is on). By default all discovered repositories",
655-
"are history-eligible; using --repository limits to only those specified.",
656-
"Option may be repeated.").Do(v -> repositories.add((String) v));
657-
658654
parser.on("-R /path/to/configuration",
659655
"Read configuration from the specified file.").Do(v -> {
660656
// Already handled above. This populates usage.
@@ -687,6 +683,12 @@ public static String[] parseOptions(String[] argv) throws ParseException {
687683
"If set to on, makes history indexing slower for repositories",
688684
"with lots of renamed files.").Do(v -> cfg.setHandleHistoryOfRenamedFiles((Boolean) v));
689685

686+
parser.on("--repository", "=path/to/repository",
687+
"Path (relative to the source root) to a repository for generating",
688+
"history (if -H,--history is on). By default all discovered repositories",
689+
"are history-eligible; using --repository limits to only those specified.",
690+
"Option may be repeated.").Do(v -> repositories.add((String) v));
691+
690692
parser.on("-S", "--search",
691693
"Search for source repositories under -s,--source, and add them.").Do(v ->
692694
searchRepositories = true);
@@ -763,14 +765,14 @@ public static String[] parseOptions(String[] argv) throws ParseException {
763765
LoggerUtil.setBaseConsoleLogLevel(Level.INFO);
764766
});
765767

766-
parser.on("--webappCtags", "=on|off", ON_OFF, Boolean.class,
767-
"Web application should run ctags when necessary. Default is off.").
768-
Do(v -> cfg.setWebappCtags((Boolean) v));
769-
770768
parser.on("-W", "--writeConfig", "=/path/to/configuration",
771769
"Write the current configuration to the specified file",
772770
"(so that the web application can use the same configuration)")
773771
.Do(configFile -> configFilename = (String) configFile);
772+
773+
parser.on("--webappCtags", "=on|off", ON_OFF, Boolean.class,
774+
"Web application should run ctags when necessary. Default is off.").
775+
Do(v -> cfg.setWebappCtags((Boolean) v));
774776
});
775777

776778
// Need to read the configuration file first

0 commit comments

Comments
 (0)