Skip to content

Commit 29057c0

Browse files
authored
Merge pull request #105 from fosslight/dev_removeLicense
Remove warranty-disclaimer from icense detected by ScanCode
2 parents 1d2ad98 + ea4f624 commit 29057c0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/fosslight_source/_parsing_scancode_file_item.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
_exclude_directory = [os.path.sep + dir_name +
1919
os.path.sep for dir_name in _exclude_directory]
2020
_exclude_directory.append("/.")
21+
remove_license = ["warranty-disclaimer"]
2122

2223

2324
def get_error_from_header(header_item):
@@ -102,6 +103,10 @@ def parsing_file_item(scancode_file_list, has_error, need_matched_license=False)
102103
for lic_item in licenses:
103104
license_value = ""
104105
key = lic_item.get("key", "")
106+
if key in remove_license:
107+
if key in license_expression_list:
108+
license_expression_list.remove(key)
109+
continue
105110
spdx = lic_item.get("spdx_license_key", "")
106111
# logger.debug("LICENSE_KEY:"+str(key)+",SPDX:"+str(spdx))
107112

0 commit comments

Comments
 (0)