pull/918/head
Josselin 3 years ago
parent b5080927d5
commit a07c2c54b9
  1. 2
      slither/__main__.py
  2. 3
      slither/utils/output.py

@ -662,7 +662,7 @@ def main_impl(all_detector_classes, all_printer_classes):
# If we are outputting JSON, capture all standard output. If we are outputting to stdout, we block typical stdout # If we are outputting JSON, capture all standard output. If we are outputting to stdout, we block typical stdout
# output. # output.
if outputting_json or output_to_sarif: if outputting_json or output_to_sarif:
StandardOutputCapture.enable(outputting_json_stdout or outputting_sarif_stdout ) StandardOutputCapture.enable(outputting_json_stdout or outputting_sarif_stdout)
printer_classes = choose_printers(args, all_printer_classes) printer_classes = choose_printers(args, all_printer_classes)
detector_classes = choose_detectors(args, all_detector_classes) detector_classes = choose_detectors(args, all_detector_classes)

@ -122,7 +122,8 @@ def output_to_sarif(filename: str, results: Dict):
if ( if (
len([x for x in sarif["runs"][0]["tool"]["driver"]["rules"] if x["id"] == check_id]) len([x for x in sarif["runs"][0]["tool"]["driver"]["rules"] if x["id"] == check_id])
== 0 == 0
): sarif["runs"][0]["tool"]["driver"]["rules"].append(rule) ):
sarif["runs"][0]["tool"]["driver"]["rules"].append(rule)
sarif["runs"][0]["results"].append( sarif["runs"][0]["results"].append(
{ {

Loading…
Cancel
Save