Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def make_epilog_text():
import xiblint.rules
description = "Lint rules:\n"
for rule_name in sorted(xiblint.rules.rule_checkers.keys()):
checker = xiblint.rules.rule_checkers[rule_name]
description += "\t{}\n".format(rule_name)
doc = checker.__doc__
if doc is not None:
for line in doc.strip().split("\n"):
description += " " * 24 + "{}\n".format(line.strip())
return description
def make_epilog_text():
import xiblint.rules
description = "Lint rules:\n"
for rule_name in sorted(xiblint.rules.rule_checkers.keys()):
checker = xiblint.rules.rule_checkers[rule_name]
description += "\t{}\n".format(rule_name)
doc = checker.__doc__
if doc is not None:
for line in doc.strip().split("\n"):
description += " " * 24 + "{}\n".format(line.strip())
return description
def validate_rule_patterns(patterns):
for pattern in (patterns or []):
if not any(fnmatch(key, pattern) for key in xiblint.rules.rule_checkers):
print("Warning: Rule pattern '{}' matches no rules".format(pattern))