diff options
author | Mike Frysinger <vapier@google.com> | 2021-05-04 08:06:36 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2021-05-04 16:40:53 +0000 |
commit | c177f944d95c460803f8a894fd13d4901c3155fe (patch) | |
tree | 1645c1bcf6e2cd304600ebc1f5193a0edf329429 /subcmds/forall.py | |
parent | aedd1e5ef015fba194681e167edf460c21a1c980 (diff) | |
download | git-repo-c177f944d95c460803f8a894fd13d4901c3155fe.tar.gz |
subcmds: force consistent help text format
We're inconsistent with help text as to whether it uses title case and
whether it ends in a period. Add a test to enforce a standard, and use
the style that Python optparse & argparse use themselves (e.g. with the
--help option): always lowercase, and never trailing period.
Change-Id: Ic1defae23daeac0ac9116aaf487427f50b34050d
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/305144
Reviewed-by: Raman Tenneti <rtenneti@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'subcmds/forall.py')
-rw-r--r-- | subcmds/forall.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/subcmds/forall.py b/subcmds/forall.py index 4a631fb7..0cf3b6a6 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py | |||
@@ -131,30 +131,30 @@ without iterating through the remaining projects. | |||
131 | def _Options(self, p): | 131 | def _Options(self, p): |
132 | p.add_option('-r', '--regex', | 132 | p.add_option('-r', '--regex', |
133 | dest='regex', action='store_true', | 133 | dest='regex', action='store_true', |
134 | help="Execute the command only on projects matching regex or wildcard expression") | 134 | help='execute the command only on projects matching regex or wildcard expression') |
135 | p.add_option('-i', '--inverse-regex', | 135 | p.add_option('-i', '--inverse-regex', |
136 | dest='inverse_regex', action='store_true', | 136 | dest='inverse_regex', action='store_true', |
137 | help="Execute the command only on projects not matching regex or " | 137 | help='execute the command only on projects not matching regex or ' |
138 | "wildcard expression") | 138 | 'wildcard expression') |
139 | p.add_option('-g', '--groups', | 139 | p.add_option('-g', '--groups', |
140 | dest='groups', | 140 | dest='groups', |
141 | help="Execute the command only on projects matching the specified groups") | 141 | help='execute the command only on projects matching the specified groups') |
142 | p.add_option('-c', '--command', | 142 | p.add_option('-c', '--command', |
143 | help='Command (and arguments) to execute', | 143 | help='command (and arguments) to execute', |
144 | dest='command', | 144 | dest='command', |
145 | action='callback', | 145 | action='callback', |
146 | callback=self._cmd_option) | 146 | callback=self._cmd_option) |
147 | p.add_option('-e', '--abort-on-errors', | 147 | p.add_option('-e', '--abort-on-errors', |
148 | dest='abort_on_errors', action='store_true', | 148 | dest='abort_on_errors', action='store_true', |
149 | help='Abort if a command exits unsuccessfully') | 149 | help='abort if a command exits unsuccessfully') |
150 | p.add_option('--ignore-missing', action='store_true', | 150 | p.add_option('--ignore-missing', action='store_true', |
151 | help='Silently skip & do not exit non-zero due missing ' | 151 | help='silently skip & do not exit non-zero due missing ' |
152 | 'checkouts') | 152 | 'checkouts') |
153 | 153 | ||
154 | g = p.get_option_group('--quiet') | 154 | g = p.get_option_group('--quiet') |
155 | g.add_option('-p', | 155 | g.add_option('-p', |
156 | dest='project_header', action='store_true', | 156 | dest='project_header', action='store_true', |
157 | help='Show project headers before output') | 157 | help='show project headers before output') |
158 | p.add_option('--interactive', | 158 | p.add_option('--interactive', |
159 | action='store_true', | 159 | action='store_true', |
160 | help='force interactive usage') | 160 | help='force interactive usage') |