Debian Codegraph @

gcc/testsuite/lib/verify-sarif-file.py

raw
1 # Verify that ARGV[1] is UTF-8 encoded and parseable as JSON
2 # For use by the verify-sarif-file directive
3
4 import json
5 import sys
6
7 sys.tracebacklimit = 0
8
9 fname = sys.argv[1]
10 with open(fname, encoding='utf-8') as f:
11 json.load(f)