Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit c55a8bc

Browse files
committed
chore: fix staticcheck issues
Signed-off-by: Yves Brissaud <[email protected]>
1 parent 42cc624 commit c55a8bc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

sbom/monitor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func WatchImages(cli command.Cli) error {
2424
go indexImageWorker(cli, indexJobs)
2525
}
2626

27-
for range time.Tick(time.Second * 5) {
27+
for range time.Tick(time.Second * 5) { //nolint:staticcheck
2828
images, err := cli.Client().ImageList(context.Background(), types.ImageListOptions{
2929
All: false,
3030
})

sbom/util/single_layer_resolver.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package util
1818

1919
import (
20+
"fmt"
2021
"io"
2122

2223
"github.com/anchore/stereoscope/pkg/file"
@@ -50,6 +51,7 @@ func (r *singleLayerResolver) FilesByPath(paths ...string) ([]source.Location, e
5051
tree := r.layer.Tree
5152
_, ref, err := tree.File(file.Path(path), filetree.FollowBasenameLinks, filetree.DoNotFollowDeadBasenameLinks)
5253
if err != nil {
54+
return nil, fmt.Errorf("could not get files for path %q: %w", path, err)
5355
}
5456
locations = append(locations, source.NewLocation(ref.String()))
5557
}
@@ -62,6 +64,7 @@ func (r *singleLayerResolver) FilesByGlob(patterns ...string) ([]source.Location
6264
tree := r.layer.Tree
6365
refs, err := tree.FilesByGlob(pattern, filetree.FollowBasenameLinks, filetree.DoNotFollowDeadBasenameLinks)
6466
if err != nil {
67+
return nil, fmt.Errorf("could not get files for pattern %q: %w", pattern, err)
6568
}
6669
for _, r := range refs {
6770
locations = append(locations, source.NewLocation(string(r.RealPath)))

0 commit comments

Comments
 (0)