Skip to content

Commit 5fdc696

Browse files
committed
Align -h output with online documentation
- Start all descriptions with a capital letter. - Rewrite some messages for clarity. - Consistently use <> syntax for metavars. Signed-off-by: John Pennycook <john.pennycook@intel.com>
1 parent 17f924b commit 5fdc696

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

bin/codebasin

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ def main():
4242
# Read command-line arguments
4343
parser = argparse.ArgumentParser(
4444
description="Code Base Investigator " + str(version),
45+
add_help=False,
46+
)
47+
parser.add_argument(
48+
"-h",
49+
"--help",
50+
action="help",
51+
help="Display help message and exit.",
4552
)
4653
parser.add_argument(
4754
"--version",
@@ -54,58 +61,59 @@ def main():
5461
"-r",
5562
"--rootdir",
5663
dest="rootdir",
57-
metavar="DIR",
64+
metavar="<dir>",
5865
default=None,
59-
help="Set working root directory (default .)",
66+
help="Set working root directory. "
67+
+ "Defaults to current working directory.",
6068
)
6169
deprecated_args.add_argument(
6270
"-c",
6371
"--config",
6472
dest="config_file",
6573
metavar="<config-file>",
6674
action="store",
67-
help="Configuration YAML file. " + "Defaults to config.yaml",
75+
help="Configuration YAML file. " + "Defaults to config.yaml.",
6876
)
6977
parser.add_argument(
7078
"-v",
7179
"--verbose",
7280
dest="verbose",
7381
action="count",
7482
default=0,
75-
help="increase verbosity level",
83+
help="Increase verbosity level.",
7684
)
7785
parser.add_argument(
7886
"-q",
7987
"--quiet",
8088
dest="quiet",
8189
action="count",
8290
default=0,
83-
help="decrease verbosity level",
91+
help="Decrease verbosity level.",
8492
)
8593
parser.add_argument(
8694
"-R",
8795
"--report",
8896
dest="reports",
89-
metavar="REPORT",
97+
metavar="<report>",
9098
default=["all"],
9199
choices=["all", "summary", "clustering"],
92100
nargs="+",
93-
help="desired output reports (default: all)",
101+
help="Generate a report of the specified type.",
94102
)
95103
deprecated_args.add_argument(
96104
"-d",
97105
"--dump",
98106
dest="dump",
99107
metavar="<file.json>",
100108
action="store",
101-
help="dump out annotated platform/parsing tree to <file.json>",
109+
help="Dump out annotated platform/parsing tree to <file.json>.",
102110
)
103111
deprecated_args.add_argument(
104112
"--batchmode",
105113
dest="batchmode",
106114
action="store_true",
107115
default=False,
108-
help="Set batch mode (additional output for bulk operation.)",
116+
help="Enable additional output for bulk operation.",
109117
)
110118
parser.add_argument(
111119
"-x",
@@ -133,7 +141,7 @@ def main():
133141
"analysis_file",
134142
metavar="<analysis-file>",
135143
nargs="?",
136-
help="TOML file describing the analysis to be performed,"
144+
help="TOML file describing the analysis to be performed, "
137145
+ "including the codebase and platform descriptions.",
138146
)
139147

0 commit comments

Comments
 (0)