Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
clavedeluna committed Dec 3, 2024
1 parent d41881e commit 5145463
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/codemodder/codeql.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def from_sarif(
) -> Self:
rule_id = cls.extract_rule_id(sarif_result, sarif_run, truncate_rule_id)
text_for_rule = get_text_for_rule(rule_id, sarif_run)
finding_msg = f"""{sarif_result['message']['text']}\n{text_for_rule}"""
finding_msg = f"{sarif_result['message']['text']}\n{text_for_rule}"
return cls(
rule_id=rule_id,
locations=cls.extract_locations(sarif_result),
Expand Down Expand Up @@ -87,5 +87,5 @@ def get_text_for_rule(rule_id: str, sarif_run: dict) -> str:
for ext in sarif_run["tool"]["extensions"]:
for rule in ext.get("rules", []):
if rule["id"] == rule_id:
return f"{rule["fullDescription"]["text"]}\n{rule["help"]["text"]}"
return f"{rule['fullDescription']['text']}\n{rule['help']['text']}"
return ""

0 comments on commit 5145463

Please sign in to comment.