Skip to content

Commit b5f4eb3

Browse files
committed
[nrf fromlist] scripts: fix get_module_setting_root in compliance check
root settings in zephyr/module.yml are in lower case and without quotes, as seen in following example: > build: > settings: > board_root: . > dts_root: . remove the `upper()` call and change `_ROOT` --> `_root`. Also remove the not needed `"` stripping. Upstream PR #: 94343 Signed-off-by: Torsten Rasmussen <[email protected]>
1 parent 8d7b9c9 commit b5f4eb3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

scripts/ci/check_compliance.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,15 @@ def get_module_setting_root(root, settings_file):
8888
# Invoke the script directly using the Python executable since this is
8989
# not a module nor a pip-installed Python utility
9090
root_paths = []
91-
9291
if os.path.exists(settings_file):
9392
with open(settings_file, 'r') as fp_setting_file:
9493
content = fp_setting_file.read()
9594

9695
lines = content.strip().split('\n')
9796
for line in lines:
98-
root = root.upper()
99-
if line.startswith(f'"{root}_ROOT":'):
97+
if line.lstrip().startswith(f'{root}_root:'):
10098
_, root_path = line.split(":", 1)
101-
root_paths.append(Path(root_path.strip('"')))
99+
root_paths.append(Path(root_path.strip()))
102100
return root_paths
103101

104102
def get_vendor_prefixes(path, errfn = print) -> set[str]:

0 commit comments

Comments
 (0)