Skip to content

Commit

Permalink
Do not fail with no results and sarif output (#1229)
Browse files Browse the repository at this point in the history
Close #1228
  • Loading branch information
sveitser authored Jun 17, 2022
1 parent 3416d05 commit 6a2e1e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slither/utils/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def output_to_sarif(
],
}

for detector in results["detectors"]:
for detector in results.get("detectors", []):
_output_result_to_sarif(detector, detectors_classes, sarif)

if filename == "-":
Expand Down

0 comments on commit 6a2e1e0

Please sign in to comment.