File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,14 @@ def main():
57
57
58
58
sarif_tool_name , sarif_data = sarifObj .load_sarif_data (sarif_file_path = sarif_file_path )
59
59
60
- logger . info ( "[" + sarif_tool_name + "]: Total no. of issues found in SARIF report - " + str ( sarif_data .get_result_count ()) )
60
+ sarif_result_count = sarif_data .get_result_count ()
61
61
62
- if sarif_data . get_result_count () > 0 :
62
+ logger . info ( "[" + sarif_tool_name + "]: Total no. of issues found in SARIF report - " + str ( sarif_result_count ))
63
63
64
+ if sarif_result_count == 0 :
65
+ logger .error ("[" + sarif_tool_name + "]: No results found." )
66
+
67
+ else :
64
68
sarif_findings = sarifObj .build_sarif_findings_dict (
65
69
sarif_tool_name = sarif_tool_name ,
66
70
sarif_data = sarif_data
@@ -121,8 +125,6 @@ def main():
121
125
issue_desc = issue_desc ,
122
126
issue_type = "Task"
123
127
)
124
- else :
125
- logger .error ("[" + sarif_tool_name + "]: No results found." )
126
128
127
129
logger .info ("Success." )
128
130
You can’t perform that action at this time.
0 commit comments