diff options
author | Shaun McCance <shaunm@redhat.com> | 2021-02-07 13:08:39 -0500 |
---|---|---|
committer | Shaun McCance <shaunm@redhat.com> | 2021-02-07 13:08:39 -0500 |
commit | 57357fe8b24c9fcfe3459242fef4ff9e758b8f4b (patch) | |
tree | 1593555e736a3b7300f1bec52f3deaf4feb63179 /tools | |
parent | 3fe6f1c2bf9482b64281fb1837a08b84d36f9369 (diff) | |
download | yelp-tools-57357fe8b24c9fcfe3459242fef4ff9e758b8f4b.tar.gz |
yelp-check: return 1 on failure for custom checkers
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/yelp-check.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/yelp-check.in b/tools/yelp-check.in index df8580c..67153e5 100755 --- a/tools/yelp-check.in +++ b/tools/yelp-check.in @@ -1155,6 +1155,7 @@ class CustomChecker(Checker): for ns in self.config.options('namespaces'): namespaces[ns] = self.config.get('namespaces', ns) + retcode = 0 for infile in self.iter_files(): xml = self.get_xml(infile) thisid = xml.getroot().get('id') or infile.filename @@ -1162,9 +1163,8 @@ class CustomChecker(Checker): for root in xml.xpath(selectexpr, namespaces=namespaces): if not bool(root.xpath(assertexpr, namespaces=namespaces)): print(infile.sitedir + thisid + ': ' + message) - # FIXME are these comments outdated? remove? - # check if self.config has section check:self.name - # check if section has select, assert, message + retcode = 1 + return retcode class YelpCheck: |