diff options
| author | flip1995 <philipp.krones@embecosm.com> | 2021-07-01 18:17:38 +0200 | 
|---|---|---|
| committer | flip1995 <philipp.krones@embecosm.com> | 2021-07-01 18:17:38 +0200 | 
| commit | 1a385b80dca128bfc5c9fc4cfb0bc8e9f5a3ef07 (patch) | |
| tree | 79a5fb72746db0fe2833c57dc197c2dd85a77c47 /src/tools/clippy/util/lintlib.py | |
| parent | 3cb1c1134050c059a15d9ca7a00d4dd89111a373 (diff) | |
| parent | 61eb38aeda6cb54b93b872bf503d70084c4d621c (diff) | |
| download | rust-1a385b80dca128bfc5c9fc4cfb0bc8e9f5a3ef07.tar.gz rust-1a385b80dca128bfc5c9fc4cfb0bc8e9f5a3ef07.zip | |
Merge commit '61eb38aeda6cb54b93b872bf503d70084c4d621c' into clippyup
Diffstat (limited to 'src/tools/clippy/util/lintlib.py')
| -rw-r--r-- | src/tools/clippy/util/lintlib.py | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/src/tools/clippy/util/lintlib.py b/src/tools/clippy/util/lintlib.py index 5707cf0ce0f..9cefb2dbb19 100644 --- a/src/tools/clippy/util/lintlib.py +++ b/src/tools/clippy/util/lintlib.py @@ -12,13 +12,14 @@ Config = collections.namedtuple('Config', 'name ty doc default') 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]+)''') -conf_re = re.compile(r'''define_Conf! {\n([^}]*)\n}''', re.MULTILINE) +conf_re = re.compile(r'''define_Conf! {\n((?!\n})[\s\S])*\n}''', re.MULTILINE) confvar_re = re.compile( r'''/// Lint: ([\w,\s]+)\. (.*)\n\s*\(([^:]+):\s*([^\s=]+)\s*=\s*([^\.\)]+).*\),''', re.MULTILINE) comment_re = re.compile(r'''\s*/// ?(.*)''') lint_levels = { "correctness": 'Deny', + "suspicious": 'Warn', "style": 'Warn', "complexity": 'Warn', "perf": 'Warn', @@ -91,7 +92,7 @@ def parse_configs(path): contents = fp.read() match = re.search(conf_re, contents) - confvars = re.findall(confvar_re, match.group(1)) + confvars = re.findall(confvar_re, match.group(0)) for (lints, doc, name, ty, default) in confvars: for lint in lints.split(','): | 
