Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions scripts/shellcheck_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ def find(obj: dict, key: str, result=None, path="") -> list[tuple]:
maybe_result = find(v, key, result, subpath)
if maybe_result is not result:
result.append((subpath, maybe_result[-1]))
elif isinstance(v, list):
for index, item in enumerate(v):
if not isinstance(item, dict):
continue
subpath = f"{path}.{index}"
maybe_result = find(item, key, result, subpath)
if maybe_result is not result:
result.append((subpath, maybe_result[-1]))
return result


Expand Down