Skip to content

Commit

Permalink
Merge pull request #9 from space-ros/results-fixes
Browse files Browse the repository at this point in the history
Check for missing ruleId, fixes #13
  • Loading branch information
Bckempa authored Dec 18, 2023
2 parents 2ccf9e1 + de8b86d commit 81a2004
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion process_sarif/sarif.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def to_dict(self) -> dict:

@staticmethod
def from_dict(result_dict: dict, artifacts: List[Artifact], tool: Tool, verbose=True, log_path: Optional[str] = None) -> "Result":
ruleId = result_dict["ruleId"]
ruleId = result_dict["ruleId"] if "ruleId" in result_dict else ""
level = Level.from_str(result_dict["level"]) if "level" in result_dict else Level.UNKNOWN
kind = ResultKind.from_str(result_dict["kind"]) if "kind" in result_dict else ResultKind.UNKNOWN
message = result_dict["message"]["text"] if "text" in result_dict["message"] else ""
Expand Down

0 comments on commit 81a2004

Please sign in to comment.