From e2224eeb4646b013bf25294221728713719d5755 Mon Sep 17 00:00:00 2001 From: Shaun McCance Date: Wed, 3 Feb 2021 21:23:14 -0500 Subject: yelp-check: Use desc if blurb not set on --help for custom checkers --- tools/yelp-check.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/yelp-check.in b/tools/yelp-check.in index 2578800..df8580c 100755 --- a/tools/yelp-check.in +++ b/tools/yelp-check.in @@ -243,6 +243,8 @@ class Checker: #FIXME: prettify names of formats if self.blurb is not None: print(self.blurb + '\n') + elif self.desc is not None: + print(self.desc + '\n') print('Options:') maxarglen = 2 args = [] @@ -1126,6 +1128,7 @@ class CustomChecker(Checker): if self.config is None or (sect not in self.config.sections()): print('Unrecognized command: ' + self.name, file=sys.stderr) return 1 + self.desc = self.config.get(sect, 'desc', fallback=None) self.blurb = self.config.get(sect, 'blurb', fallback=None) if self.blurb is not None: self.blurb = '\n'.join(textwrap.wrap(self.blurb)) -- cgit v1.2.1