@@ -461,7 +461,7 @@ public static String[] parseOptions(String[] argv) throws ParseException {
461
461
"Files with the named prefix/extension should be analyzed" ,
462
462
"with the given analyzer, where 'analyzer' may be specified" ,
463
463
"using a simple class name (RubyAnalyzer) or language name (C)" ,
464
- "(Note, analyzer specification is case sensitive)" ,
464
+ "(Note, analyzer specification is case- sensitive)" ,
465
465
" Ex: -A .foo:CAnalyzer" ,
466
466
" will use the C analyzer for all files ending with .FOO" ,
467
467
" Ex: -A bar.:Perl" ,
@@ -528,11 +528,9 @@ public static String[] parseOptions(String[] argv) throws ParseException {
528
528
});
529
529
530
530
parser .on ("-e" , "--economical" ,
531
- "Economical, consumes less disk space." ,
532
- "It does not generate hyper text cross reference files offline," ,
533
- "but will do so on demand, which could be sightly slow." ).Do (v -> {
534
- cfg .setGenerateHtml (false );
535
- });
531
+ "To consume less disk space, OpenGrok will not generate and save" ,
532
+ "hypertext cross-reference files but will generate on demand, which could" ,
533
+ "be slightly slow." ).Do (v -> cfg .setGenerateHtml (false ));
536
534
537
535
parser .on ("-G" , "--assignTags" ,
538
536
"Assign commit tags to all entries in history for all repositories." ).Do (v -> {
@@ -544,17 +542,15 @@ public static String[] parseOptions(String[] argv) throws ParseException {
544
542
});
545
543
546
544
parser .on ("-I" , "--include" , "=pattern" ,
547
- "Only files matching this pattern will be examined." ,
548
- "(supports wildcards, example: -I *.java -I *.c)" ).Do (pattern -> {
549
- cfg .getIncludedNames ().add ((String ) pattern );
550
- });
545
+ "Only files matching this pattern will be examined. Pattern supports" ,
546
+ "wildcards (example: -I '*.java' -I '*.c'). Option may be repeated." ).Do (
547
+ pattern -> cfg .getIncludedNames ().add ((String ) pattern ));
551
548
552
549
parser .on ("-i" , "--ignore" , "=pattern" ,
553
- "Ignore the named files (prefixed with 'f:')" ,
554
- "or directories (prefixed with 'd:')." ,
555
- "Supports wildcards (example: -i *.so -i *.dll)" ).Do (pattern -> {
556
- cfg .getIgnoredNames ().add ((String ) pattern );
557
- });
550
+ "Ignore matching files (prefixed with 'f:' or no prefix) or directories" ,
551
+ "(prefixed with 'd:'). Pattern supports wildcards (example: -i '*.so'" ,
552
+ "-i d:'test*'). Option may be repeated." ).Do (pattern ->
553
+ cfg .getIgnoredNames ().add ((String ) pattern ));
558
554
559
555
parser .on ("-l" , "--lock" , "=on|off|simple|native" , LUCENE_LOCKS ,
560
556
"Set OpenGrok/Lucene locking mode of the Lucene database" ,
@@ -577,11 +573,11 @@ public static String[] parseOptions(String[] argv) throws ParseException {
577
573
});
578
574
579
575
parser .on ("-m" , "--memory" , "=number" , Double .class ,
580
- "Amount of memory that may be used for buffering added documents and" ,
581
- "deletions before they are flushed to the directory (default " + Configuration . defaultRamBufferSize + "MB)." ,
582
- "Please increase JVM heap accordingly, too. " ).Do ( memSize -> {
583
- cfg . setRamBufferSize (( Double ) memSize );
584
- } );
576
+ "Amount of memory (MB) that may be used for buffering added documents and" ,
577
+ "deletions before they are flushed to the directory (default " +
578
+ Configuration . defaultRamBufferSize + ")." ,
579
+ "Please increase JVM heap accordingly too." ). Do ( memSize ->
580
+ cfg . setRamBufferSize (( Double ) memSize ) );
585
581
586
582
parser .on ("--man" , "Generate OpenGrok XML manual page." ).Do (v -> {
587
583
try {
@@ -604,9 +600,9 @@ public static String[] parseOptions(String[] argv) throws ParseException {
604
600
allowedSymlinks .add ((String ) v ));
605
601
606
602
parser .on ("-n" , "--noIndex" ,
607
- "Do not generate indexes and other data (such as history cache" ,
608
- "and xref files), but process all other command line options." ).Do (v ->
609
- runIndex = false );
603
+ "Do not generate indexes and other data (such as history cache and xref " ,
604
+ " files), but process all other command line options." ).Do (v ->
605
+ runIndex = false );
610
606
611
607
parser .on ("-O" , "--optimize" , "=on|off" , ON_OFF , Boolean .class ,
612
608
"Turn on/off the optimization of the index database" ,
@@ -640,42 +636,37 @@ public static String[] parseOptions(String[] argv) throws ParseException {
640
636
cfg .setProjectsEnabled (true );
641
637
});
642
638
643
- parser .on ("-p" , "--defaultProject" , "=/path/to/default/project" ,
644
- "This is the path to the project that should be selected" ,
645
- "by default in the web application (when no other project" ,
646
- "set either in cookie or in parameter). Option may be repeated" ,
647
- "to specify several projects. Use \" __all__\" for all projects." ,
648
- "You should strip off the source root." ).Do (v -> {
649
- defaultProjects .add ((String ) v );
650
- });
639
+ parser .on ("-p" , "--defaultProject" , "=path/to/default/project" ,
640
+ "Path (relative to the source root) to a project that should be selected" ,
641
+ "by default in the web application (when no other project is set either" ,
642
+ "in a cookie or in parameter). Option may be repeated to specify several" ,
643
+ "projects. Use the special value __all__ to indicate all projects." ).Do (v ->
644
+ defaultProjects .add ((String ) v ));
651
645
652
646
parser .on ("--profiler" , "Pause to await profiler or debugger." ).
653
647
Do (v -> awaitProfiler = true );
654
648
655
649
parser .on ("--progress" ,
656
- "Print per project percentage progress information." ,
657
- "(I/O extensive, since one read through directory structure is" ,
658
- "made before indexing, needs -v, otherwise it just goes to the log)" ).
659
- Do (v -> cfg .setPrintProgress (true )
660
- );
650
+ "Print per-project percentage progress information." ).Do (v ->
651
+ cfg .setPrintProgress (true ));
661
652
662
653
parser .on ("-Q" , "--quickScan" , "=on|off" , ON_OFF , Boolean .class ,
663
- "Turn on/off quick context scan. By default, only the first" ,
664
- "1024k of a file is scanned, and a '[..all..]' link is inserted" ,
665
- "when the file is bigger. Activating this may slow the server down." ,
666
- "(Note: this is setting only affects the web application)" ).Do (v -> {
667
- cfg .setQuickContextScan ((Boolean ) v );
668
- });
654
+ "Turn on/off quick context scan. By default, only the first 1024KB of a" ,
655
+ "file is scanned, and a link ('[..all..]') is inserted when the file is" ,
656
+ "bigger. Activating this may slow the server down. (Note: this setting" ,
657
+ "only affects the web application.)" ).Do (v ->
658
+ cfg .setQuickContextScan ((Boolean ) v ));
669
659
670
660
parser .on ("-q" , "--quiet" , "Run as quietly as possible." ,
671
661
"Sets logging level to WARNING." ).Do (v -> {
672
662
LoggerUtil .setBaseConsoleLogLevel (Level .WARNING );
673
663
});
674
664
675
- parser .on ("--repository" , "=repository" ,
676
- "Generate history for specific repository specified as relative" ,
677
- "path to source root. Assumes -H,--history is on. Option may be" ,
678
- "repeated." ).Do (v -> repositories .add ((String ) v ));
665
+ parser .on ("--repository" , "=path/to/repository" ,
666
+ "Path (relative to the source root) to a repository for generating" ,
667
+ "history (if -H,--history is on). By default all discovered repositories" ,
668
+ "are history-eligible; using --repository limits to only those specified." ,
669
+ "Option may be repeated." ).Do (v -> repositories .add ((String ) v ));
679
670
680
671
parser .on ("-R /path/to/configuration" ,
681
672
"Read configuration from the specified file." ).Do (v -> {
@@ -710,7 +701,8 @@ public static String[] parseOptions(String[] argv) throws ParseException {
710
701
"with lots of renamed files." ).Do (v -> cfg .setHandleHistoryOfRenamedFiles ((Boolean ) v ));
711
702
712
703
parser .on ("-S" , "--search" ,
713
- "Search for \" external\" source repositories and add them." ).Do (v -> searchRepositories = true );
704
+ "Search for source repositories under -s,--source, and add them." ).Do (v ->
705
+ searchRepositories = true );
714
706
715
707
parser .on ("-s" , "--source" , "=/path/to/source/root" ,
716
708
"The root directory of the source tree." ).
@@ -728,10 +720,9 @@ public static String[] parseOptions(String[] argv) throws ParseException {
728
720
);
729
721
730
722
parser .on ("--style" , "=path" ,
731
- "Path to the subdirectory in the web-application containing the" ,
732
- "requested stylesheet. The factory-setting is: \" default\" ." ).
733
- Do (stylePath -> cfg .setWebappLAF ((String ) stylePath )
734
- );
723
+ "Path to the subdirectory in the web application containing the requested" ,
724
+ "stylesheet. The factory-setting is: \" default\" ." ).Do (stylePath ->
725
+ cfg .setWebappLAF ((String ) stylePath ));
735
726
736
727
parser .on ("-T" , "--threads" , "=number" , Integer .class ,
737
728
"The number of threads to use for index generation." ,
@@ -742,7 +733,7 @@ public static String[] parseOptions(String[] argv) throws ParseException {
742
733
"Default tab size to use (number of spaces per tab character)." )
743
734
.Do (tabSize -> cfg .setTabSize ((Integer ) tabSize ));
744
735
745
- parser .on ("-U" , "--uri" , "=protocol ://webappURI:port/contextPath" ,
736
+ parser .on ("-U" , "--uri" , "=SCHEME ://webappURI:port/contextPath" ,
746
737
"Send the current configuration to the specified webappURI" ).Do (webAddr -> {
747
738
webappURI = (String ) webAddr ;
748
739
try {
@@ -763,8 +754,8 @@ public static String[] parseOptions(String[] argv) throws ParseException {
763
754
parser .on ("---unitTest" ); // For unit test only, will not appear in help
764
755
765
756
parser .on ("--updateConfig" ,
766
- "Populate the webapp with bare configuration and exit." )
767
- . Do ( v -> bareConfig = true );
757
+ "Populate the webapp with bare configuration, and exit." ). Do ( v ->
758
+ bareConfig = true );
768
759
769
760
parser .on ("--userPage" , "=URL" ,
770
761
"Base URL of the user Information provider." ,
@@ -775,7 +766,7 @@ public static String[] parseOptions(String[] argv) throws ParseException {
775
766
"URL Suffix for the user Information provider. Default: \" \" ." )
776
767
.Do (suffix -> cfg .setUserPageSuffix ((String ) suffix ));
777
768
778
- parser .on ("-V" , "--version" , "Print version and quit." ).Do (v -> {
769
+ parser .on ("-V" , "--version" , "Print version, and quit." ).Do (v -> {
779
770
System .out .println (Info .getFullVersion ());
780
771
System .exit (0 );
781
772
});
0 commit comments