fix: traverse all languages

This commit is contained in:
Michael Hohn
2021-11-09 14:29:31 -08:00
committed by =Michael Hohn
parent c6641019bf
commit a0af2c8c59
3 changed files with 47 additions and 41 deletions

View File

@@ -4,6 +4,10 @@ MIN_PYTHON = (3, 7)
if sys.version_info < MIN_PYTHON:
sys.exit("Python %s.%s or later is required.\n" % MIN_PYTHON)
def indices(sarif_struct, *path):
""" Return a range for the indices of PATH """
return range(0, len(get(sarif_struct, *path)))
def get(sarif_struct, *path):
""" Get the sarif entry at PATH """
res = sarif_struct