Skip to content

Commit fe16c10

Browse files
committed
scripts: ci: check_compliance: Add check for zephyr module file
Adds a check which fails CI if a zephyr module file is added to the zephyr repository itself Signed-off-by: Jamie McCrae <[email protected]>
1 parent 87917a1 commit fe16c10

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

scripts/ci/check_compliance.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,6 +1732,23 @@ def run(self):
17321732
self.failure(f"Missing {maintainers_file} entry for: \"{area}\"")
17331733

17341734

1735+
class ZephyrModuleFile(ComplianceTest):
1736+
"""
1737+
Check that no zephyr/module.yml file has been added to the Zephyr repository
1738+
"""
1739+
name = "ZephyrModuleFile"
1740+
doc = "Check that no zephyr/module.yml file has been added to the Zephyr repository."
1741+
1742+
def run(self):
1743+
module_files = [ZEPHYR_BASE / 'zephyr' / 'module.yml',
1744+
ZEPHYR_BASE / 'zephyr' / 'module.yaml']
1745+
1746+
for file in module_files:
1747+
if os.path.exists(file):
1748+
self.failure(f"A zephyr module file has been added to to the Zephyr repository")
1749+
break
1750+
1751+
17351752
class YAMLLint(ComplianceTest):
17361753
"""
17371754
YAMLLint

0 commit comments

Comments
 (0)