aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/libgdiagnostics.dg/sarif.py
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/libgdiagnostics.dg/sarif.py')
-rw-r--r--gcc/testsuite/libgdiagnostics.dg/sarif.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/gcc/testsuite/libgdiagnostics.dg/sarif.py b/gcc/testsuite/libgdiagnostics.dg/sarif.py
deleted file mode 100644
index 7daf35b..0000000
--- a/gcc/testsuite/libgdiagnostics.dg/sarif.py
+++ /dev/null
@@ -1,23 +0,0 @@
-import json
-import os
-
-def sarif_from_env():
- # return parsed JSON content a SARIF_PATH file
- json_filename = os.environ['SARIF_PATH']
- json_filename += '.sarif'
- print('json_filename: %r' % json_filename)
- with open(json_filename) as f:
- json_data = f.read()
- return json.loads(json_data)
-
-def get_location_artifact_uri(location):
- return location['physicalLocation']['artifactLocation']['uri']
-
-def get_location_physical_region(location):
- return location['physicalLocation']['region']
-
-def get_location_snippet_text(location):
- return location['physicalLocation']['contextRegion']['snippet']['text']
-
-def get_location_relationships(location):
- return location['relationships']