Skip to content

Commit ddfb74b

Browse files
committed
BugFix : Removing case sensitivity of licenseIds Signed-off-by: Puneeth Y <[email protected]>
1 parent 8050fd9 commit ddfb74b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/spdx_tools/spdx/validation/license_expression_validator.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def validate_license_expression(
4040
)
4141

4242
validation_messages = []
43-
license_ref_ids: List[str] = [license_ref.license_id for license_ref in document.extracted_licensing_info]
43+
license_ref_ids: List[str] = [license_ref.license_id.lower() for license_ref in document.extracted_licensing_info]
4444

4545
for non_spdx_token in spdx_licensing.validate(license_expression).invalid_symbols:
4646
if ":" in non_spdx_token:
@@ -72,7 +72,7 @@ def validate_license_expression(
7272
)
7373
)
7474

75-
elif non_spdx_token not in license_ref_ids:
75+
elif non_spdx_token.lower() not in license_ref_ids:
7676
validation_messages.append(
7777
ValidationMessage(
7878
f"Unrecognized license reference: {non_spdx_token}. license_expression must only use IDs from the "

0 commit comments

Comments
 (0)