group_re = re.compile(r'''\s*([a-z_][a-z_0-9]+)''')
conf_re = re.compile(r'''define_Conf! {\n([^}]*)\n}''', re.MULTILINE)
confvar_re = re.compile(
- r'''/// Lint: (\w+)\. (.*)\n\s*\([^,]+,\s+"([^"]+)":\s+([^,]+),\s+([^\.\)]+).*\),''', re.MULTILINE)
+ r'''/// Lint: ([\w,\s]+)\. (.*)\n\s*\(([^:]+):\s*([^\s=]+)\s*=\s*([^\.\)]+).*\),''', re.MULTILINE)
comment_re = re.compile(r'''\s*/// ?(.*)''')
lint_levels = {
match = re.search(conf_re, contents)
confvars = re.findall(confvar_re, match.group(1))
- for (lint, doc, name, ty, default) in confvars:
- configs[lint.lower()] = Config(name.replace("_", "-"), ty, doc, default)
-
+ for (lints, doc, name, ty, default) in confvars:
+ for lint in lints.split(','):
+ configs[lint.strip().lower()] = Config(name.replace("_", "-"), ty, doc, default)
return configs