Skip to content

Commit 1d5145a

Browse files
committed
Update result to scanitem
Signed-off-by: jiyeong.seok <[email protected]>
1 parent d7e94ff commit 1d5145a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/fosslight_source/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

229230
def 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

321322
if __name__ == '__main__':

0 commit comments

Comments
 (0)