Skip to content

reusable-copyright-license-check.yml: Add root level license detection#40

Closed
Tarun Goyal (targoy-qti) wants to merge 1 commit into
qualcomm:mainfrom
targoy-qti:targoy-qti-patch-3
Closed

reusable-copyright-license-check.yml: Add root level license detection#40
Tarun Goyal (targoy-qti) wants to merge 1 commit into
qualcomm:mainfrom
targoy-qti:targoy-qti-patch-3

Conversation

@targoy-qti

Copy link
Copy Markdown
Contributor

https://jira-dc.qualcomm.com/jira/browse/LOSTINTPRJ-2041
https://github.com/qualcomm/copyright-license-checker-action/releases/tag/v1.2.0

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

…e detection

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>
@targoy-qti Tarun Goyal (targoy-qti) deleted the targoy-qti-patch-3 branch June 10, 2026 17: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.

1 participant