Skip to content

Commit 6a197c0

Browse files
committed
Update doc generation script
1 parent 6c06320 commit 6a197c0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

clippy_lints/src/utils/conf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ define_Conf! {
150150
(trivial_copy_size_limit, "trivial_copy_size_limit": Option<u64>, None),
151151
/// Lint: TOO_MANY_LINES. The maximum number of lines a function or method can have
152152
(too_many_lines_threshold, "too_many_lines_threshold": u64, 100),
153-
/// Lint: LARGE_STACK_ARRAYS. The maximum allowed size for arrays on the stack
153+
/// Lint: LARGE_STACK_ARRAYS, LARGE_CONST_ARRAYS. The maximum allowed size for arrays on the stack
154154
(array_size_threshold, "array_size_threshold": u64, 512_000),
155155
/// Lint: VEC_BOX. The size of the boxed type in bytes, where boxing in a `Vec` is allowed
156156
(vec_box_size_threshold, "vec_box_size_threshold": u64, 4096),

util/lintlib.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
group_re = re.compile(r'''\s*([a-z_][a-z_0-9]+)''')
1515
conf_re = re.compile(r'''define_Conf! {\n([^}]*)\n}''', re.MULTILINE)
1616
confvar_re = re.compile(
17-
r'''/// Lint: (\w+)\. (.*)\n\s*\([^,]+,\s+"([^"]+)":\s+([^,]+),\s+([^\.\)]+).*\),''', re.MULTILINE)
17+
r'''/// Lint: ([\w,\s]+)\. (.*)\n\s*\([^,]+,\s+"([^"]+)":\s+([^,]+),\s+([^\.\)]+).*\),''', re.MULTILINE)
1818
comment_re = re.compile(r'''\s*/// ?(.*)''')
1919

2020
lint_levels = {
@@ -93,9 +93,9 @@ def parse_configs(path):
9393
match = re.search(conf_re, contents)
9494
confvars = re.findall(confvar_re, match.group(1))
9595

96-
for (lint, doc, name, ty, default) in confvars:
97-
configs[lint.lower()] = Config(name.replace("_", "-"), ty, doc, default)
98-
96+
for (lints, doc, name, ty, default) in confvars:
97+
for lint in lints.split(','):
98+
configs[lint.strip().lower()] = Config(name.replace("_", "-"), ty, doc, default)
9999
return configs
100100

101101

0 commit comments

Comments
 (0)