From 4ea0e88687b7dda107a56dead49c583f7bfa3f74 Mon Sep 17 00:00:00 2001 From: Tomi Fontanilles Date: Thu, 15 Aug 2024 09:41:56 +0300 Subject: [PATCH] scripts: ci: check_compliance: allow Kconfig references with '(' and '.' For regexes such as `CONFIG_DEBUG_(OPTIMIZATIONS|INFO)` and to be able to use `.*` as this syntax is used in the Kconfig search. Signed-off-by: Tomi Fontanilles --- scripts/ci/check_compliance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci/check_compliance.py b/scripts/ci/check_compliance.py index 04e5a4400dd..d19e347ed70 100755 --- a/scripts/ci/check_compliance.py +++ b/scripts/ci/check_compliance.py @@ -838,7 +838,7 @@ Missing SoC names or CONFIG_SOC vs soc.yml out of sync: undef_to_locs = collections.defaultdict(list) # Warning: Needs to work with both --perl-regexp and the 're' module - regex = r"\bCONFIG_[A-Z0-9_]+\b(?!\s*##|[$@{*])" + regex = r"\bCONFIG_[A-Z0-9_]+\b(?!\s*##|[$@{(.*])" # Skip doc/releases and doc/security/vulnerabilities.rst, which often # reference removed symbols @@ -881,7 +881,7 @@ If the reference is for a comment like /* CONFIG_FOO_* */ (or /* CONFIG_FOO_*_... */), then please use exactly that form (with the '*'). The CI check knows not to flag it. -More generally, a reference followed by $, @, {{, *, or ## will never be +More generally, a reference followed by $, @, {{, (, ., *, or ## will never be flagged. {undef_desc}""")