Skip to content

Update reusable-copyright-license-check.yml#41

Merged
Mark Matyas (mynameistechno) merged 1 commit into
qualcomm:mainfrom
targoy-qti:targoy-qti-patch-1
Jun 10, 2026
Merged

Update reusable-copyright-license-check.yml#41
Mark Matyas (mynameistechno) merged 1 commit into
qualcomm:mainfrom
targoy-qti:targoy-qti-patch-1

Conversation

@targoy-qti

Copy link
Copy Markdown
Contributor

https://jira-dc.qualcomm.com/jira/browse/LOSTINTPRJ-2041
Release v1.2.0 · qualcomm/copyright-license-checker-action

Overview

Enhance license detection to automatically scan repository LICENSE
files using the scancode toolkit, with intelligent fallback to
configuration-based lookup.

Key Changes

1. Automatic License Detection

  • Added detect_license_from_file() function
  • Scans LICENSE files using scancode toolkit
  • Returns SPDX license identifiers
  • Supports multiple formats:
    • LICENSE
    • LICENSE.txt
    • LICENSE.md
    • COPYING

2. Enhanced License Resolution Strategy

Implemented a three-tier fallback in get_license():

  1. Primary: Auto-detect from repository LICENSE file
  2. Fallback: Config-based lookup using repository name
  3. Default: Return BSD-3-Clause-Clear

3. BSD License Normalization

  • Normalize BSD variants:
    • BSD-2-Clause
    • BSD-3-Clause
    • LicenseRef-scancode-bsd-x11
  • Map all variants to BSD-3-Clause-Clear
  • Ensure case-insensitive normalization

Impact

  • Reduce dependency on manual config maintenance
  • Improve accuracy using repository source files
  • Preserve backward compatibility

Benefits

  • Automation: No manual license configuration needed
  • Accuracy: Detect licenses from actual source files
  • Consistency: Standardize BSD license handling

Enhance license detection to automatically scan repository 
LICENSE files using the scancode toolkit, with intelligent 
fallback to configuration-based lookup.

Signed-off-by: Tarun Goyal <targoy@qti.qualcomm.com>
@mynameistechno Mark Matyas (mynameistechno) merged commit 4d4eb11 into qualcomm:main Jun 10, 2026
10 checks passed
@targoy-qti Tarun Goyal (targoy-qti) deleted the targoy-qti-patch-1 branch June 11, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants