[yelp-tools] yelp-check: return 1 on failure for custom checkers



commit 57357fe8b24c9fcfe3459242fef4ff9e758b8f4b
Author: Shaun McCance <shaunm redhat com>
Date:   Sun Feb 7 13:08:39 2021 -0500

    yelp-check: return 1 on failure for custom checkers

 tools/yelp-check.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/tools/yelp-check.in b/tools/yelp-check.in
index df8580c7..67153e56 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:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]