mirror of
https://github.com/hohn/sarif-cli.git
synced 2025-12-16 17:23:03 +01:00
pre-alpha versions of bin/sarif-{digest,labeled,list-files,results-summary
This commit is contained in:
committed by
=Michael Hohn
parent
d180a079b0
commit
3032fe3fcd
18
sarif_cli/__init__.py
Normal file
18
sarif_cli/__init__.py
Normal 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')
|
||||
|
||||
Reference in New Issue
Block a user