Skip to content

Commit 6751c85

Browse files
nordicjmcfriedt
authored andcommitted
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 46ad33a commit 6751c85

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,4 @@ SysbuildKconfigBasic.txt
110110
SysbuildKconfigBasicNoModules.txt
111111
TextEncoding.txt
112112
YAMLLint.txt
113+
ZephyrModuleFile.txt

scripts/ci/check_compliance.py

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

17871787

1788+
class ZephyrModuleFile(ComplianceTest):
1789+
"""
1790+
Check that no zephyr/module.yml file has been added to the Zephyr repository
1791+
"""
1792+
name = "ZephyrModuleFile"
1793+
doc = "Check that no zephyr/module.yml file has been added to the Zephyr repository."
1794+
1795+
def run(self):
1796+
module_files = [ZEPHYR_BASE / 'zephyr' / 'module.yml',
1797+
ZEPHYR_BASE / 'zephyr' / 'module.yaml']
1798+
1799+
for file in module_files:
1800+
if os.path.exists(file):
1801+
self.failure("A zephyr module file has been added to the Zephyr repository")
1802+
break
1803+
1804+
17881805
class YAMLLint(ComplianceTest):
17891806
"""
17901807
YAMLLint

0 commit comments

Comments
 (0)