rust-lang / rust-lang/rust-clippy
Restriction Lint: Crate License
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
After seeing the new-ish cargo metadata lints, I was thinking it would interesting to have a lint like:
crate_license
Check the license information in the crate metadata and restrict to something.
I imagine a whitelist/blacklist of licenses would be what most want.
# in clippy.toml
blacklisted-licenses = ["MIT"]
whitelisted-licenses = ["MPL"]
This seems fairly straightforward to implement after reading some of the source for the cargo lints. If we want to do this I'd love to try to implement.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing cargo metadata lints, which the issue identifies as the closest implementation reference. Define how clippy.toml whitelist and blacklist settings should be interpreted and how crate license metadata is checked; done should include the new lint and coverage for accepted and restricted licenses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100