From cb6f05b85bcfac3a0c462288f4ac15936a1f11d1 Mon Sep 17 00:00:00 2001 From: Wonjae Park Date: Thu, 29 Feb 2024 16:48:25 +0900 Subject: [PATCH] Change SCANOSS thread using -c option Signed-off-by: Wonjae Park --- src/fosslight_source/_help.py | 2 +- src/fosslight_source/cli.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fosslight_source/_help.py b/src/fosslight_source/_help.py index bd9a0f5..99c9d55 100644 --- a/src/fosslight_source/_help.py +++ b/src/fosslight_source/_help.py @@ -24,7 +24,7 @@ -s \t Select which scanner to be run (scancode, scanoss, all) -j\t\t\t Generate raw result of scanners in json format -t \t\t Stop scancode scanning if scanning takes longer than a timeout in seconds. - -c \t\t Select the number of cores to be scanned with ScanCode. + -c \t\t Select the number of cores to be scanned with ScanCode or threads with SCANOSS. --no_correction\t Enter if you don't want to correct OSS information with sbom-info.yaml --correct_fpath Path to the sbom-info.yaml file""" diff --git a/src/fosslight_source/cli.py b/src/fosslight_source/cli.py index 36085bd..bcdb1c9 100755 --- a/src/fosslight_source/cli.py +++ b/src/fosslight_source/cli.py @@ -260,7 +260,7 @@ def run_scanners(path_to_scan, output_file_name="", write_json_file=False, num_c print_matched_text, format, called_by_cli, time_out, correct_mode, correct_filepath) if selected_scanner == 'scanoss' or selected_scanner == 'all' or selected_scanner == '': - scanoss_result = run_scanoss_py(path_to_scan, output_file_name, format, True, write_json_file) + scanoss_result = run_scanoss_py(path_to_scan, output_file_name, format, True, write_json_file, num_cores) if selected_scanner in SCANNER_TYPE: spdx_downloads = get_spdx_downloads(path_to_scan) merged_result = merge_results(scancode_result, scanoss_result, spdx_downloads)