Skip to content

Commit

Permalink
[MegaLinter] Apply linters fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nvuillam committed Jun 18, 2023
1 parent 93cf1a2 commit ce1cc89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion megalinter/Linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1332,9 +1332,10 @@ def get_total_number_errors(self, stdout: str):
)
# Count number of results in sarif format
elif self.cli_lint_errors_count == "sarif":
sarif = None
try:
sarif = json.loads(stdout)
except ValueError as e:
except ValueError:
logging.warning("Unable to parse sarif :" + stdout)
if sarif and sarif["runs"] and sarif["runs"][0]["results"]:
total_errors = len(sarif["runs"][0]["results"])
Expand Down

0 comments on commit ce1cc89

Please sign in to comment.