mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
Auto merge of #5353 - flip1995:conf_doc, r=Manishearth
Fix documentation generation for configurable lints In #5135, the configuration macro changed, but the documentation generation script wasn't updated. This PR catches up on this. [Preview](https://flip1995.github.io/rust-clippy/master/index.html) r? @Manishearth changelog: Document configuration options of lints again.
This commit is contained in:
commit
89303daf6c
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ lintname_re = re.compile(r'''pub\s+([A-Z_][A-Z_0-9]*)''')
|
||||||
group_re = re.compile(r'''\s*([a-z_][a-z_0-9]+)''')
|
group_re = re.compile(r'''\s*([a-z_][a-z_0-9]+)''')
|
||||||
conf_re = re.compile(r'''define_Conf! {\n([^}]*)\n}''', re.MULTILINE)
|
conf_re = re.compile(r'''define_Conf! {\n([^}]*)\n}''', re.MULTILINE)
|
||||||
confvar_re = re.compile(
|
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*/// ?(.*)''')
|
comment_re = re.compile(r'''\s*/// ?(.*)''')
|
||||||
|
|
||||||
lint_levels = {
|
lint_levels = {
|
||||||
|
@ -93,7 +93,7 @@ def parse_configs(path):
|
||||||
match = re.search(conf_re, contents)
|
match = re.search(conf_re, contents)
|
||||||
confvars = re.findall(confvar_re, match.group(1))
|
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)
|
configs[lint.lower()] = Config(name.replace("_", "-"), ty, doc, default)
|
||||||
|
|
||||||
return configs
|
return configs
|
||||||
|
|
Loading…
Reference in a new issue