Skip to content

Commit

Permalink
BugFix : Removing case sensitivity of licenseIds
Browse files Browse the repository at this point in the history
Signed-off-by: Puneeth <[email protected]>
  • Loading branch information
puneeth072003 committed Dec 31, 2023
1 parent 8050fd9 commit abac8f6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def validate_license_expression(
)

validation_messages = []
license_ref_ids: List[str] = [license_ref.license_id for license_ref in document.extracted_licensing_info]
license_ref_ids: List[str] = [license_ref.license_id.lower() for license_ref in document.extracted_licensing_info]

for non_spdx_token in spdx_licensing.validate(license_expression).invalid_symbols:
if ":" in non_spdx_token:
Expand Down Expand Up @@ -72,7 +72,7 @@ def validate_license_expression(
)
)

elif non_spdx_token not in license_ref_ids:
elif non_spdx_token.lower() not in license_ref_ids:
validation_messages.append(
ValidationMessage(
f"Unrecognized license reference: {non_spdx_token}. license_expression must only use IDs from the "
Expand Down

0 comments on commit abac8f6

Please sign in to comment.