@@ -224,6 +224,7 @@ def create_report_file(_start_time, merged_result, license_list, scanoss_result,
224224 logger .info (row )
225225 else :
226226 logger .error (f"Fail to generate result file { result_file } . msg:({ msg } )" )
227+ return scan_item
227228
228229
229230def merge_results (scancode_result = [], scanoss_result = [], spdx_downloads = {}):
@@ -305,7 +306,7 @@ def run_scanners(path_to_scan, output_file_name="", write_json_file=False, num_c
305306 if selected_scanner in SCANNER_TYPE :
306307 spdx_downloads = get_spdx_downloads (path_to_scan , path_to_exclude )
307308 merged_result = merge_results (scancode_result , scanoss_result , spdx_downloads )
308- create_report_file (start_time , merged_result , license_list , scanoss_result , selected_scanner ,
309+ scan_item = create_report_file (start_time , merged_result , license_list , scanoss_result , selected_scanner ,
309310 print_matched_text , output_path , output_files , output_extensions , correct_mode ,
310311 correct_filepath , path_to_scan , path_to_exclude )
311312 else :
@@ -315,7 +316,7 @@ def run_scanners(path_to_scan, output_file_name="", write_json_file=False, num_c
315316 else :
316317 result_log [RESULT_KEY ] = f"Format error. { msg } "
317318 success = False
318- return success , result_log .get (RESULT_KEY , "" ), merged_result , license_list , scanoss_result
319+ return success , result_log .get (RESULT_KEY , "" ), scan_item , license_list , scanoss_result
319320
320321
321322if __name__ == '__main__' :
0 commit comments