Skip to content

Commit 669638d

Browse files
Fix exclude error
Signed-off-by: Wonjae Park <j.wonjae.park@gmail.com>
1 parent 8145345 commit 669638d

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

src/fosslight_source/cli.py

+3-21
Original file line numberDiff line numberDiff line change
@@ -110,26 +110,9 @@ def main() -> None:
110110

111111
if os.path.isdir(path_to_scan):
112112
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)
113+
result = run_scanners(path_to_scan, output_file_name, write_json_file, core, True,
114+
print_matched_text, formats, time_out, correct_mode, correct_filepath,
115+
selected_scanner, path_to_exclude)
133116
sys.exit(0)
134117

135118
_result_log["Scan Result"] = result[1]
@@ -309,7 +292,6 @@ def merge_results(scancode_result: list = [], scanoss_result: list = [], spdx_do
309292
for i in range(len(scancode_result) - 1, -1, -1): # Iterate from last to first
310293
item_path = scancode_result[i].source_name_or_path # Assuming SourceItem has 'file_path' attribute
311294
if item_path in excluded_file_list:
312-
print("EXCLUDING : ", item_path)
313295
del scancode_result[i] # Delete matching item
314296

315297
for item in scancode_result:

0 commit comments

Comments
 (0)