Skip to content

Commit

Permalink
Merge pull request #14 from aibaars/patch-1
Browse files Browse the repository at this point in the history
Update filter_sarif.py: use UTF-8 as encoding for reading/writing SARIF content
  • Loading branch information
aegilops authored Apr 10, 2024
2 parents 28c10be + f3d7349 commit 59d0a64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filter_sarif.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def filter_sarif(args):
)
)

with open(args.input, 'r') as f:
with open(args.input, 'r', encoding='utf-8') as f:
s = json.load(f)

for run in s.get('runs', []):
Expand Down Expand Up @@ -107,7 +107,7 @@ def filter_sarif(args):
new_results.append(r)
run['results'] = new_results

with open(args.output, 'w') as f:
with open(args.output, 'w', encoding='utf-8') as f:
json.dump(s, f, indent=2)


Expand Down

0 comments on commit 59d0a64

Please sign in to comment.