Skip to content

Commit f302e2e

Browse files
committed
fix check-cfg-flags.py
1 parent 23c60eb commit f302e2e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ci/check-cfg-flags.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ def check_cfg_args(cfg):
158158
line = file.readline()
159159
if not line:
160160
break
161-
if "#[cfg(" in line:
161+
if "#[cfg(" in line and not "quote!" in line:
162162
if not line.strip().startswith("//"):
163-
cfg_part = cfg_regex.match(line.strip()).group(1)
163+
match = cfg_regex.match(line.strip())
164+
if match is None:
165+
print("Bad cfg line: " + line.strip())
166+
continue
167+
cfg_part = match.group(1)
164168
check_cfg_args(cfg_part)

0 commit comments

Comments
 (0)