public/license
Public repository has a LICENSE
| Severity | error |
| Tiers | all |
| Stacks | any |
| Scope | root |
| Kind | expr |
| Source | library v0.5.0 |
| Selected by | fleetlint-minimal@v0.5.0 |
Requirement
A public repository has a license file at its root: LICENSE*, LICENCE*, UNLICENSE, COPYING* (any case), or a REUSE LICENSES/ directory. The manifest’s SPDX identifier is checked by public/manifest-license.
Why
Without a license, nobody may legally use the code.
Applies when
repo.publicCheck
glob("*").exists(f, f.matches(r'(?i)^(un)?licen[cs]e([.-][^/]*)?$|^copying([.-][^/]*)?$')) || exists("LICENSES/*")Fix
Add LICENSE (MIT or Apache-2.0) with the current year and your name.
Agent instruction: Ask the user which license; add the LICENSE file and the SPDX identifier to the package manifest.
A finding of this rule points at LICENSE.
Sources
- https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository (guidance)
- https://github.com/ossf/scorecard/blob/main/docs/checks.md (standard, License)
- https://reuse.software/spec/ (standard)
- https://fleetlint.org/baseline/#public-repositories
Generated by fleetlint docs from catalog v0.5.0.