Skip to content

Commit

Permalink
LicenseInputSpec: do not add 'ListVersion' with 'Inline' (#2166)
Browse files Browse the repository at this point in the history
Signed-off-by: mrizzi <[email protected]>
  • Loading branch information
mrizzi authored Oct 4, 2024
1 parent f13bed1 commit e5b1595
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions pkg/ingestor/parser/common/license.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ func ParseLicenses(exp string, lv *string, inLineMap map[string]string) []model.
var license *model.LicenseInputSpec
if inline, ok := inLineMap[p]; ok {
license = &model.LicenseInputSpec{
Name: p,
Inline: &inline,
ListVersion: lv,
Name: p,
Inline: &inline,
}
} else {
if !strings.HasPrefix(p, "LicenseRef") {
Expand Down
5 changes: 2 additions & 3 deletions pkg/ingestor/parser/spdx/parse_spdx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1016,9 +1016,8 @@ func Test_spdxParser(t *testing.T) {
},
Declared: []generated.LicenseInputSpec{
{
Name: "LicenseRef-2ba8ded3",
Inline: ptrfrom.String("Redistribution and use of the this code or any derivative works are permitted provided that the following conditions are met..."),
ListVersion: ptrfrom.String("1.2.3"),
Name: "LicenseRef-2ba8ded3",
Inline: ptrfrom.String("Redistribution and use of the this code or any derivative works are permitted provided that the following conditions are met..."),
},
},
CertifyLegal: &generated.CertifyLegalInputSpec{
Expand Down

0 comments on commit e5b1595

Please sign in to comment.