Skip to content

Improve license detection #4412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/licensedcode/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,9 @@ def build_spdx_license_expression(license_expression, licensing=None):
>>> spdx = "MIT OR GPL-2.0-only WITH LicenseRef-scancode-generic-exception"
>>> assert build_spdx_license_expression(exp) == spdx
"""
if not license_expression:
return

if not licensing:
licensing = get_licensing()
validate_spdx_license_keys(license_expression=license_expression, licensing=licensing)
Expand Down
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/lead-in_unknown_43.RULE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
license_expression: unknown-license-reference
is_license_tag: yes
is_license_clue: yes
relevance: 60
notes: Creative commons tag seen in RDF or XML documents
---
Expand Down
Loading
Loading