Skip to content

Commit

Permalink
Merge pull request #223 from aidankeefe2022/main
Browse files Browse the repository at this point in the history
Fixed off by one error
  • Loading branch information
riteshnoronha authored Apr 16, 2024
2 parents b619421 + f706c77 commit ca4f441
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/scorer/ntia.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ func compWithUniqIDCheck(d sbom.Document, c *check) score {
return strings.Join([]string{d.Spec().Namespace(), c.ID()}, ""), true
})

uniqComps := lo.Uniq(compIDs)
//uniqComps := lo.Uniq(compIDs)

if totalComponents > 0 {

s.setScore((float64(len(uniqComps)) / float64(totalComponents)) * 10.0)
s.setScore((float64(len(compIDs)) / float64(totalComponents)) * 10.0)
}
s.setDesc(fmt.Sprintf("%d/%d have unique ID's", len(uniqComps), totalComponents))
s.setDesc(fmt.Sprintf("%d/%d have unique ID's", len(compID), totalComponents))
return *s
}

Expand Down

0 comments on commit ca4f441

Please sign in to comment.