aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib/verify-sarif-file.py
blob: f1833f3016e85430cb0cc3eb058c848c006b2a19 (plain)
1
2
3
4
5
6
7
8
9
10
11
# Verify that ARGV[1] is UTF-8 encoded and parseable as JSON
# For use by the verify-sarif-file directive

import json
import sys

sys.tracebacklimit = 0

fname = sys.argv[1]
with open(fname, encoding="utf-8") as f:
    json.load(f)