diff --git a/ci/check-cfg-flags.py b/ci/check-cfg-flags.py index fd514da657b..dcb27edf669 100755 --- a/ci/check-cfg-flags.py +++ b/ci/check-cfg-flags.py @@ -158,7 +158,11 @@ def check_cfg_args(cfg): line = file.readline() if not line: break - if "#[cfg(" in line: + if "#[cfg(" in line and not "quote!" in line: if not line.strip().startswith("//"): - cfg_part = cfg_regex.match(line.strip()).group(1) + match = cfg_regex.match(line.strip()) + if match is None: + print("Bad cfg line: " + line.strip()) + continue + cfg_part = match.group(1) check_cfg_args(cfg_part)