mirror of
https://github.com/anchore/syft.git
synced 2026-10-31 22:46:36 +01:00
chore(deps): update tools to latest versions (#3775)
--------- Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com> Co-authored-by: spiffcs <32073428+spiffcs@users.noreply.github.com>
This commit is contained in:
co-authored by
spiffcs
parent
12f36420dd
commit
f11377fe30
@@ -361,6 +361,7 @@ func collectDocRelationships(spdxIDMap map[string]any, doc *spdx.Document) (out
|
||||
from, fromOk := a.(pkg.Package)
|
||||
toPackage, toPackageOk := b.(pkg.Package)
|
||||
toLocation, toLocationOk := b.(file.Location)
|
||||
//nolint:staticcheck
|
||||
if !fromOk || !(toPackageOk || toLocationOk) {
|
||||
log.Debugf("unable to find valid relationship mapping from SPDX, ignoring: (from: %+v) (to: %+v)", a, b)
|
||||
continue
|
||||
|
||||
@@ -213,13 +213,15 @@ func reduceOuter(expression string) string {
|
||||
func isBalanced(expression string) bool {
|
||||
count := 0
|
||||
for _, c := range expression {
|
||||
if c == '(' {
|
||||
switch c {
|
||||
case '(':
|
||||
count++
|
||||
} else if c == ')' {
|
||||
case ')':
|
||||
count--
|
||||
if count < 0 {
|
||||
return false
|
||||
}
|
||||
default:
|
||||
}
|
||||
}
|
||||
return count == 0
|
||||
|
||||
@@ -228,7 +228,7 @@ func toSyftRelationships(doc *model.Document, catalog *pkg.Collection, relations
|
||||
idMap[string(p.ID())] = p
|
||||
locations := p.Locations.ToSlice()
|
||||
for _, l := range locations {
|
||||
idMap[string(l.Coordinates.ID())] = l.Coordinates
|
||||
idMap[string(l.ID())] = l.Coordinates
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user