Skip to content

Commit

Permalink
lint: Improving comprehension of the script
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeDavis-Ibexlabs committed Sep 11, 2024
1 parent 37aca12 commit e5f5371
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@ def main():

sarif_tool_name, sarif_data = sarifObj.load_sarif_data(sarif_file_path=sarif_file_path)

logger.info("[" + sarif_tool_name + "]: Total no. of issues found in SARIF report - " + str(sarif_data.get_result_count()))
sarif_result_count = sarif_data.get_result_count()

if sarif_data.get_result_count() > 0:
logger.info("[" + sarif_tool_name + "]: Total no. of issues found in SARIF report - " + str(sarif_result_count))

if sarif_result_count == 0:
logger.error("[" + sarif_tool_name + "]: No results found.")

else:
sarif_findings = sarifObj.build_sarif_findings_dict(
sarif_tool_name=sarif_tool_name,
sarif_data=sarif_data
Expand Down Expand Up @@ -121,8 +125,6 @@ def main():
issue_desc = issue_desc,
issue_type = "Task"
)
else:
logger.error("[" + sarif_tool_name + "]: No results found.")

logger.info("Success.")

Expand Down

0 comments on commit e5f5371

Please sign in to comment.