|
26 | 26 | from ._scan_item import SourceItem |
27 | 27 | from fosslight_util.oss_item import ScannerItem |
28 | 28 | from typing import Tuple |
29 | | -import time |
30 | 29 |
|
31 | 30 | SRC_SHEET_NAME = 'SRC_FL_Source' |
32 | 31 | SCANOSS_HEADER = {SRC_SHEET_NAME: ['ID', 'Source Path', 'OSS Name', |
@@ -110,26 +109,9 @@ def main() -> None: |
110 | 109 |
|
111 | 110 | if os.path.isdir(path_to_scan): |
112 | 111 | result = [] |
113 | | - |
114 | | - test_cases = [ |
115 | | - (["file1.js", "file2.py"], "./exclude_test"), |
116 | | - (["sample/*"], "./exclude_test"), |
117 | | - (["sample/subfolder/*"], "./exclude_test"), |
118 | | - (["*.py"], "./exclude_test"), |
119 | | - (["subfolder"], "./exclude_test"), |
120 | | - ] |
121 | | - # no = 0 |
122 | | - # for i, (patterns, path_to_scan) in enumerate(test_cases, 1): |
123 | | - |
124 | | - for i, (path_to_exclude, path_to_scan) in enumerate(test_cases, 1): |
125 | | - print(f"\n=== 케이스 {i} ===", path_to_exclude) |
126 | | - result = run_scanners(path_to_scan, output_file_name, write_json_file, core, True, |
127 | | - print_matched_text, formats, time_out, correct_mode, correct_filepath, |
128 | | - selected_scanner, path_to_exclude) |
129 | | - time.sleep(40) |
130 | | - # result = run_scanners(path_to_scan, output_file_name, write_json_file, core, True, |
131 | | - # print_matched_text, formats, time_out, correct_mode, correct_filepath, |
132 | | - # selected_scanner, path_to_exclude) |
| 112 | + result = run_scanners(path_to_scan, output_file_name, write_json_file, core, True, |
| 113 | + print_matched_text, formats, time_out, correct_mode, correct_filepath, |
| 114 | + selected_scanner, path_to_exclude) |
133 | 115 | sys.exit(0) |
134 | 116 |
|
135 | 117 | _result_log["Scan Result"] = result[1] |
@@ -309,7 +291,6 @@ def merge_results(scancode_result: list = [], scanoss_result: list = [], spdx_do |
309 | 291 | for i in range(len(scancode_result) - 1, -1, -1): # Iterate from last to first |
310 | 292 | item_path = scancode_result[i].source_name_or_path # Assuming SourceItem has 'file_path' attribute |
311 | 293 | if item_path in excluded_file_list: |
312 | | - print("EXCLUDING : ", item_path) |
313 | 294 | del scancode_result[i] # Delete matching item |
314 | 295 |
|
315 | 296 | for item in scancode_result: |
|
0 commit comments