Skip to content

Commit

Permalink
squashed all layers
Browse files Browse the repository at this point in the history
Signed-off-by: tomersein <tomersein@gmail.com>
  • Loading branch information
tomersein committed Sep 20, 2024
1 parent f148dda commit 1d27acc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion syft/internal/fileresolver/container_image_all_layers.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ func (r *ContainerImageAllLayers) FilesByPath(paths ...string) ([]file.Location,
}

// FilesByGlob returns all file.References that match the given path glob pattern from any layer in the image.
// nolint:gocognit
//
//nolint:gocognit
func (r *ContainerImageAllLayers) FilesByGlob(patterns ...string) ([]file.Location, error) {
uniqueFileIDs := stereoscopeFile.NewFileReferenceSet()
uniqueLocations := make([]file.Location, 0)
Expand Down
3 changes: 2 additions & 1 deletion syft/internal/fileresolver/container_image_squash.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ func (r *ContainerImageSquash) FilesByPath(paths ...string) ([]file.Location, er
}

// FilesByGlob returns all file.References that match the given path glob pattern within the squashed representation of the image.
// nolint:gocognit
//
//nolint:gocognit
func (r *ContainerImageSquash) FilesByGlob(patterns ...string) ([]file.Location, error) {
uniqueFileIDs := stereoscopeFile.NewFileReferenceSet()
uniqueLocations := make([]file.Location, 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ func (i *ContainerImageSquashAllLayers) FilesByPath(paths ...string) ([]file.Loc
}

// FilesByGlob returns all file.References that match the given path glob pattern from any layer in the image.
// nolint:gocognit
//
//nolint:gocognit

Check failure on line 82 in syft/internal/fileresolver/container_image_squash_all_layers.go

View workflow job for this annotation

GitHub Actions / Static analysis

directive `//nolint:gocognit` is unused for linter "gocognit" (nolintlint)
func (i *ContainerImageSquashAllLayers) FilesByGlob(patterns ...string) ([]file.Location, error) {
squashedLocations, err := i.squashed.FilesByGlob(patterns...)
if err != nil {
Expand Down

0 comments on commit 1d27acc

Please sign in to comment.