From 1763bafe699f42b7a096e7c73bb5a38643835e83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 03:36:49 +0000 Subject: [PATCH 1/3] build(deps): bump sigs.k8s.io/release-utils from 0.7.5 to 0.7.6 Bumps [sigs.k8s.io/release-utils](https://github.com/kubernetes-sigs/release-utils) from 0.7.5 to 0.7.6. - [Release notes](https://github.com/kubernetes-sigs/release-utils/releases) - [Commits](https://github.com/kubernetes-sigs/release-utils/compare/v0.7.5...v0.7.6) --- updated-dependencies: - dependency-name: sigs.k8s.io/release-utils dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 49808f1c..1c9710d6 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( golang.org/x/term v0.13.0 golang.org/x/tools/go/vcs v0.1.0-deprecated gopkg.in/yaml.v2 v2.4.0 - sigs.k8s.io/release-utils v0.7.5 + sigs.k8s.io/release-utils v0.7.6 ) require ( diff --git a/go.sum b/go.sum index 83aa2668..046fa017 100644 --- a/go.sum +++ b/go.sum @@ -214,5 +214,5 @@ modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/sqlite v1.23.1 h1:nrSBg4aRQQwq59JpvGEQ15tNxoO5pX/kUjcRNwSAGQM= modernc.org/sqlite v1.23.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk= -sigs.k8s.io/release-utils v0.7.5 h1:0DYUWILqT0rirJ+8Vrp+Fr8jG8Q32ejFnulkahOvEao= -sigs.k8s.io/release-utils v0.7.5/go.mod h1:GZGWmbINwsLGKsoZKTeWUGp4F+Rbwhq4XDtJ45N+dLw= +sigs.k8s.io/release-utils v0.7.6 h1:mQxQRAIulbyz6y7eOCzklAelcpYjBj8MMGFcxNnyqto= +sigs.k8s.io/release-utils v0.7.6/go.mod h1:GZGWmbINwsLGKsoZKTeWUGp4F+Rbwhq4XDtJ45N+dLw= From aef5896b24907250a3548fc7a05071032d27277b Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Mon, 30 Oct 2023 09:04:27 +0100 Subject: [PATCH 2/3] Fix build Signed-off-by: Sascha Grunert --- magefile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magefile.go b/magefile.go index b9aefbd0..914fb895 100644 --- a/magefile.go +++ b/magefile.go @@ -90,7 +90,7 @@ func Verify() error { } fmt.Println("Running go module linter...") - if err := mage.VerifyGoMod(scriptDir); err != nil { + if err := mage.VerifyGoMod(); err != nil { return err } From e7763d6ae3d41578dc7f558ec95ac6a6a2cd478d Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Mon, 30 Oct 2023 09:14:00 +0100 Subject: [PATCH 3/3] Fix lint Signed-off-by: Sascha Grunert --- .golangci.yml | 2 ++ pkg/query/filter_test.go | 4 ++-- pkg/spdx/spdx_unit_test.go | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index a699bcb7..d34c9825 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -180,3 +180,5 @@ linters-settings: require-explanation: false # Enable to require nolint directives to mention the specific linter being suppressed. Default is false. require-specific: true + goconst: + min-occurrences: 5 diff --git a/pkg/query/filter_test.go b/pkg/query/filter_test.go index 64e61310..fe5a9d0d 100644 --- a/pkg/query/filter_test.go +++ b/pkg/query/filter_test.go @@ -30,10 +30,10 @@ func testPackages() map[string]*spdx.Package { p := spdx.NewPackage() p.ID = s p.Name = fmt.Sprintf("gcr.io/puerco-chainguard/images/%s:v9.0.2-buster", s) - dg := "sha256:4ed64c2e0857ad21c38b98345ebb5edb01791a0a10b0e9e3d9ddde185cdbd31a" //nolint: gosec + dg := "sha256:4ed64c2e0857ad21c38b98345ebb5edb01791a0a10b0e9e3d9ddde185cdbd31a" repo := "index.docker.io%2Flibrary" if i == 1 { - dg = "sha256:c0d8e30ad4f13b5f26794264fe057c488c72a5112978b1c24f3940dfaf69368a" //nolint: gosec + dg = "sha256:c0d8e30ad4f13b5f26794264fe057c488c72a5112978b1c24f3940dfaf69368a" repo = "gcr.io%2Fproject" } p.ExternalRefs = []spdx.ExternalRef{ diff --git a/pkg/spdx/spdx_unit_test.go b/pkg/spdx/spdx_unit_test.go index ef9ee5cf..c4fb0ea3 100644 --- a/pkg/spdx/spdx_unit_test.go +++ b/pkg/spdx/spdx_unit_test.go @@ -299,7 +299,7 @@ func TestGetImageReferences(t *testing.T) { } // Test a sha reference. This is the linux/ppc64le image - singleRef := "registry.k8s.io/kube-apiserver@sha256:1a61b61491042e2b1e659c4d57d426d01d9467fb381404bff029be4d00ead519" //nolint: gosec + singleRef := "registry.k8s.io/kube-apiserver@sha256:1a61b61491042e2b1e659c4d57d426d01d9467fb381404bff029be4d00ead519" references, err = getImageReferences(singleRef) require.NoError(t, err) require.Len(t, references.Images, 0)