pre-alpha versions of bin/sarif-{digest,labeled,list-files,results-summary

This commit is contained in:
Michael Hohn
2021-11-09 12:20:28 -08:00
committed by =Michael Hohn
parent d180a079b0
commit 3032fe3fcd
14 changed files with 301 additions and 0 deletions

18
sarif_cli/__init__.py Normal file
View File

@@ -0,0 +1,18 @@
import sys
MIN_PYTHON = (3, 7)
if sys.version_info < MIN_PYTHON:
sys.exit("Python %s.%s or later is required.\n" % MIN_PYTHON)
def get(sarif_struct, *path):
""" Get the sarif entry at PATH """
res = sarif_struct
for p in path:
res = res[p]
return res
def msg(message):
""" Print message to stdout """
sys.stdout.write(message)
sys.stdout.write('\n')