Skip to content

Commit a285047

Browse files
committed
ci: symbol_depend: Fix endif block detection
Consider lines that start with endif, since it may have comments. Signed-off-by: Jorge Marques <[email protected]>
1 parent 4a7eeaa commit a285047

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ci/symbols_depend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def track_if_blocks(symbol, target_kconfig):
6464

6565
for kconfig in get_all_parent_kconfigs(path.dirname(target_kconfig)):
6666
if debug:
67-
print(f"{target_kconfig}: Tracking if blocks at '{kconfig}'",
67+
print(f"{target_kconfig}: Tracking if blocks at '{kconfig}' for symbol '{symbol}'",
6868
file=stderr)
6969
with open(kconfig, 'r') as f:
7070
lines = f.readlines()
@@ -74,7 +74,7 @@ def track_if_blocks(symbol, target_kconfig):
7474
line_ = line.strip()
7575
if line.startswith('if '):
7676
stack.append(line[3:].strip())
77-
elif line_ == 'endif':
77+
elif line_.startswith('endif'):
7878
if stack:
7979
stack.pop()
8080
elif line_.startswith('source') and line_.endswith('Kconfig"'):

0 commit comments

Comments
 (0)