Skip to content

Commit

Permalink
Fix documentation generation for configurable lints
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Mar 22, 2020
1 parent 0e5e2c4 commit a1dc609
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/lintlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
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+)\. (.*)\n\s*\([^,]+,\s+"([^"]+)":\s+([^,]+),\s+([^\.\)]+).*\),''', re.MULTILINE)
comment_re = re.compile(r'''\s*/// ?(.*)''')

lint_levels = {
Expand Down Expand Up @@ -93,7 +93,7 @@ def parse_configs(path):
match = re.search(conf_re, contents)
confvars = re.findall(confvar_re, match.group(1))

for (lint, doc, name, default, ty) in confvars:
for (lint, doc, name, ty, default) in confvars:
configs[lint.lower()] = Config(name.replace("_", "-"), ty, doc, default)

return configs
Expand Down

0 comments on commit a1dc609

Please sign in to comment.