aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib/verify-sarif-file.py
blob: eb6236f564cb651f13cdbc4ddb0513ef5ddbff03 (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)