public/manifest-license/dotnet
Package manifest declares the license
Implements public/manifest-license for dotnet.
| Severity | info |
| Tiers | 1 |
| Stacks | dotnet |
| Scope | each |
| Kind | expr |
| Source | library v0.2.0 |
| Selected by | fleetlint-recommended@v0.2.0 |
Requirement
A packable project (or Directory.Build.props) sets PackageLicenseExpression (SPDX) or PackageLicenseFile; projects that pack nothing are not checked.
Why
Registries, SBOM tools and license checkers read the manifest, not the LICENSE file.
Capability applies when
repo.publicCheck
!glob("**/*.csproj").exists(f, text(f).matches(r'<(PackageId|IsPackable>\s*true)')) || (glob("**/*.csproj") + glob("**/Directory.Build.props")).exists(f, text(f).matches(r'<PackageLicense(Expression|File)>'))Fix
Add <PackageLicenseExpression>SPDX-id</PackageLicenseExpression> to Directory.Build.props or the packable project.
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.
See: https://fleetlint.org/baseline/#public-repositories, https://fleetlint.org/stacks/#net
Generated by fleetlint docs from catalog v0.2.0.