Skip to content
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

Add notes to rejected licenses #618

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Add notes to rejected licenses #618

merged 1 commit into from
Feb 28, 2024

Conversation

Jake-Shadle
Copy link
Member

With the new changes coming once #611 deprecations have been fully removed, licenses will be rejected unless explicitly allowed. To help users, rejected licenses will now have notes printed with the SPDX short id, the full license name, and metadata for the license, eg.

= OpenSSL - OpenSSL License:
=   - FSF Free/Libre
= GPL-3.0 - GNU General Public License v3.0 only:
=  - **DEPRECATED**
=  - OSI approved
=  - FSF Free/Libre
=  - Copyleft

Additionally, the diagnostic for rejected expressions now only includes the span information for rejected licenses, unless the log level is set to info or higher via -L info.

Old:

error[rejected]: failed to satisfy license requirements
   ┌─ /home/jake/code/cargo-deny/deny.toml:71:15
   │
71 │ expression = "ISC AND MIT AND OpenSSL"
   │               ^^^-----^^^-----^^^^^^^
   │               │       │       │
   │               │       │       rejected: license was not explicitly allowed
   │               │       accepted: license is explicitly allowed
   │               license expression retrieved via user override
   │               accepted: license is explicitly allowed
   │

New:

error[rejected]: failed to satisfy license requirements
   ┌─ /home/jake/code/cargo-deny/deny.toml:71:31
   │
71 │ expression = "ISC AND MIT AND OpenSSL"
   │               ----------------^^^^^^^
   │               │               │
   │               │               rejected: license was not explicitly allowed
   │               license expression retrieved via user override
   │

@Jake-Shadle Jake-Shadle merged commit 37a79b9 into main Feb 28, 2024
10 checks passed
@Jake-Shadle Jake-Shadle deleted the add-license-notes branch February 28, 2024 08:36
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