mirror of
https://github.com/hohn/sarif-cli.git
synced 2025-12-16 09:13:04 +01:00
Fix load error csv output error
This commit is contained in:
@@ -45,7 +45,7 @@ def load(fname):
|
|||||||
except json.decoder.JSONDecodeError as err:
|
except json.decoder.JSONDecodeError as err:
|
||||||
logging.error('Error reading from {}: {}: line {}, column {}'
|
logging.error('Error reading from {}: {}: line {}, column {}'
|
||||||
.format(fname, err.msg, err.lineno, err.colno))
|
.format(fname, err.msg, err.lineno, err.colno))
|
||||||
status_writer.file_load_error["file"] = fname
|
status_writer.file_load_error["sarif_file"] = fname
|
||||||
status_writer.csv_write(status_writer.file_load_error)
|
status_writer.csv_write(status_writer.file_load_error)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
return content
|
return content
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ input_sarif_missing = {
|
|||||||
|
|
||||||
# file load error can happen on either sarif file or scan-spec.json
|
# file load error can happen on either sarif file or scan-spec.json
|
||||||
file_load_error = {
|
file_load_error = {
|
||||||
"file": "",
|
"sarif_file": "",
|
||||||
"level": "ERROR",
|
"level": "ERROR",
|
||||||
"levelcode": 3,
|
"levelcode": 3,
|
||||||
"message": "Could not load file."
|
"message": "Could not load file."
|
||||||
|
|||||||
Reference in New Issue
Block a user