Skip to content

Commit 02ac441

Browse files
Fix exclude error
Signed-off-by: Wonjae Park <[email protected]>
1 parent 8145345 commit 02ac441

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

src/fosslight_source/cli.py

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from ._scan_item import SourceItem
2727
from fosslight_util.oss_item import ScannerItem
2828
from typing import Tuple
29-
import time
3029

3130
SRC_SHEET_NAME = 'SRC_FL_Source'
3231
SCANOSS_HEADER = {SRC_SHEET_NAME: ['ID', 'Source Path', 'OSS Name',
@@ -110,26 +109,9 @@ def main() -> None:
110109

111110
if os.path.isdir(path_to_scan):
112111
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)
133115
sys.exit(0)
134116

135117
_result_log["Scan Result"] = result[1]
@@ -309,7 +291,6 @@ def merge_results(scancode_result: list = [], scanoss_result: list = [], spdx_do
309291
for i in range(len(scancode_result) - 1, -1, -1): # Iterate from last to first
310292
item_path = scancode_result[i].source_name_or_path # Assuming SourceItem has 'file_path' attribute
311293
if item_path in excluded_file_list:
312-
print("EXCLUDING : ", item_path)
313294
del scancode_result[i] # Delete matching item
314295

315296
for item in scancode_result:

0 commit comments

Comments
 (0)