def lint()

in shelldocs/src/main/python/shelldocs.py [0:0]


    def lint(self):
        '''Lint this function'''
        validvalues = {
            "audience": ("Public", "Private"),
            "stability": ("Stable", "Evolving"),
            "replacerawtext": ("yes", "no"),
        }
        for attribute, attrvalues in validvalues.items():
            value = getattr(self, attribute)
            if (not value or value == '') and attribute != 'replacerawtext':
                logging.error("%s:%u:ERROR: function %s has no @%s",
                              self.filename, self.linenum, self.name,
                              attribute.lower())
            elif value not in attrvalues:
                if attribute == 'replacerawtext' and value == '':
                    continue
                validvalue = "|".join(v.lower() for v in attrvalues)
                logging.error(
                    "%s:%d:ERROR: function %s has invalid value (%s) for @%s (%s)",
                    self.filename, self.linenum, self.name, value.lower(),
                    attribute.lower().replace('rawtext', 'able'), validvalue)