@@ -505,6 +505,9 @@ class KconfigCheck(ComplianceTest):
505505 # Kconfig symbol prefix/namespace.
506506 CONFIG_ = "CONFIG_"
507507
508+ # If modules should be excluded from checks.
509+ EXCLUDE_MODULES = False
510+
508511 def run (self ):
509512 kconf = self .parse_kconfig ()
510513
@@ -1052,8 +1055,8 @@ def check_no_enable_in_boolean_prompt(self, kconf):
10521055 # Checks that boolean's prompt does not start with "Enable...".
10531056
10541057 for node in kconf .node_iter ():
1055- # skip Kconfig nodes not in-tree (will present an absolute path)
1056- if os .path .isabs (node .filename ):
1058+ # skip Kconfig nodes not in-tree when set to (will present an absolute path)
1059+ if os .path .isabs (node .filename ) and self . EXCLUDE_MODULES is True :
10571060 continue
10581061
10591062 # 'kconfiglib' is global
@@ -1482,6 +1485,7 @@ class KconfigBasicNoModulesCheck(KconfigBasicCheck):
14821485 name = "KconfigBasicNoModules"
14831486 path_hint = "<zephyr-base>"
14841487 EMPTY_FILE_CONTENTS = "# Empty\n "
1488+ EXCLUDE_MODULES = True
14851489
14861490 def get_modules (self , module_dirs_file , modules_file , sysbuild_modules_file , settings_file ):
14871491 with open (module_dirs_file , 'w' ) as fp_module_file :
@@ -1574,6 +1578,7 @@ class SysbuildKconfigBasicNoModulesCheck(SysbuildKconfigCheck, KconfigBasicNoMod
15741578 """
15751579 name = "SysbuildKconfigBasicNoModules"
15761580 path_hint = "<zephyr-base>"
1581+ EXCLUDE_MODULES = True
15771582
15781583
15791584class Nits (ComplianceTest ):
0 commit comments