Skip to content

Commit

Permalink
feat: update constructor to include expression (#24)
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Phillips <[email protected]>
  • Loading branch information
spiffcs authored Dec 12, 2023
1 parent 215f5f7 commit 52dba00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .grant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ rules:
- "alpine-baselayout" # We don't link against this package so we don't care about its license
- "base-files"
- "netbase"
- "libssl3"
- pattern: "*BSD*"
name: "bsd-denied"
mode: "deny"
Expand Down
4 changes: 3 additions & 1 deletion grant/case.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,12 @@ func grantLicenseFromClassifierResults(r results.LicenseTypes) []License {
spdxLicense, err := spdxlicense.GetLicenseByID(license.Name)
if err != nil {
licenses = append(licenses, License{
Name: license.Name,
LicenseID: license.Name,
Name: license.Name,
})
} else {
licenses = append(licenses, License{
SPDXExpression: spdxLicense.LicenseID,
Reference: spdxLicense.Reference,
IsDeprecatedLicenseID: spdxLicense.IsDeprecatedLicenseID,
DetailsURL: spdxLicense.DetailsURL,
Expand Down

0 comments on commit 52dba00

Please sign in to comment.