public/manifest-license/cpp
Package manifest declares the license
Implements public/manifest-license for cpp.
| Severity | info |
| Tiers | 1 |
| Stacks | cpp |
| Scope | each |
| Kind | expr |
| Source | library v0.6.0 |
| Selected by | fleetlint-recommended@v0.6.0 |
Requirement
vcpkg.json sets license and conanfile.py sets license, where they exist; plain CMake projects have no license field and are not checked.
Why
Registries, SBOM tools and license checkers read the manifest, not the LICENSE file.
Capability applies when
repo.publicCheck
(!file("vcpkg.json") || (json("vcpkg.json") != null && has(json("vcpkg.json").license))) && (!file("conanfile.py") || text("conanfile.py").matches(r'(?m)^\s*license\s*='))Fix
Add "license": "<SPDX id>" to vcpkg.json or license = "<SPDX id>" to the conanfile.
Agent instruction: Set the manifest’s license field to the SPDX identifier matching the LICENSE file; ask if the LICENSE text is not a recognised license.
A finding of this rule points at the file (["vcpkg.json", "conanfile.py"].filter(f, file(f)) + ["vcpkg.json"])[0] yields.
Sources
- https://spdx.org/licenses/ (spec)
- https://fleetlint.org/baseline/#public-repositories (convention)
- https://learn.microsoft.com/en-us/vcpkg/reference/vcpkg-json (spec, license)
- https://docs.conan.io/2/reference/conanfile/attributes.html (spec)
- https://fleetlint.org/stacks/#cc
Generated by fleetlint docs from catalog v0.6.0.