Repository navigation
chore: deny unused licenses and license exceptions in cargo-deny - #3497
Conversation
1b7baa5 to
def242e
Compare
Co-authored-by: Daniel Carl Jones <[email protected]> Co-authored-by: Copilot App <[email protected]>
def242e to
cc039a5
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
No open issues 🎉
What changed in this PR
Tightens cargo-deny license hygiene by failing the check when configured allowed licenses or per-crate license exceptions are no longer encountered, preventing stale entries from lingering unnoticed.
Changes:
- Set
unused-allowed-licensetodenyso unused entries inlicenses.allowfail the check - Set
unused-license-exceptiontodenyso stale per-crate exceptions fail the check
| File | Description |
|---|---|
| deny.toml | Makes unused allowed licenses and license exceptions fail cargo deny check licenses instead of warning |
Review effort: Lite
Co-authored-by: Copilot App <[email protected]>
dannycjones
left a comment
There was a problem hiding this comment.
Only one comment, but I think we should ship with either config
| # https://www.apache.org/legal/resolved.html#category-a | ||
| "BSL-1.0", | ||
| ] | ||
| unused-allowed-license = "deny" |
There was a problem hiding this comment.
I was thinking to simply leave them allowed, since its effectively the list of category A and its just churn to remove or add.
There was a problem hiding this comment.
I think a stricter rule is better so that we could clean unnecessary items in time.
blackmwk
left a comment
There was a problem hiding this comment.
Thanks @kevinjqliu for this pr!
Which issue does this PR close?
What changes are included in this PR?
Sets
unused-allowed-licenseandunused-license-exceptiontodeny(cargo-deny defaults both towarn), so unused allowed licenses and stale per-crate exceptions fail the check instead of slipping through.Based on the change by @dannycjones in this earlier PR.
Are these changes tested?
Config-only.
cargo deny check licensespasses (cargo-deny 0.19.9). An unused allowed license fails withlicense-not-encountered, and a stale exception fails withlicense-exception-not-encountered.AI Disclosure
Prepared with Copilot (made the change and ran the checks); no areas of particular uncertainty.