Skip to content

Commit e20c9bc

Browse files
🌱 Upgrade golangci-lint from v2.1.6 to v2.6.2 (#2336)
* Upgrade golangci-lint from v2.1.6 to v2.6.2 **Steps Executed** - with go 1.24.6 - bingo get golangci-lint@none - bingo get github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest * (fix): Linter issue : testifylint error-is-as: use require.ErrorIs or require.ErrorAs depending on the case
1 parent c06f27f commit e20c9bc

File tree

7 files changed

+191
-193
lines changed

7 files changed

+191
-193
lines changed

.bingo/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
!variables.env
1212

1313
*tmp.mod
14+
*tmp.sum

.bingo/README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# Project Development Dependencies.
22

3-
This is directory which stores Go modules with pinned buildable package that is used within this repository, managed by https://github.com/bwplotka/bingo.
3+
This is directory which stores Go modules with pinned buildable package that is used within this repository, managed by <https://github.com/bwplotka/bingo>.
44

55
* Run `bingo get` to install all tools having each own module file in this directory.
6-
* Run `bingo get <tool>` to install <tool> that have own module file in this directory.
7-
* For Makefile: Make sure to put `include .bingo/Variables.mk` in your Makefile, then use $(<upper case tool name>) variable where <tool> is the .bingo/<tool>.mod.
6+
* Run `bingo get <tool>` to install `<tool>` that have own module file in this directory.
7+
* For Makefile: Make sure to put `include .bingo/Variables.mk` in your Makefile, then use `\$(<UPPER_CASE_TOOL_NAME>)` variable where `<tool>` is the .bingo/`<tool>.mod`.
88
* For shell: Run `source .bingo/variables.env` to source all environment variable for each tool.
9-
* For go: Import `.bingo/variables.go` to for variable names.
10-
* See https://github.com/bwplotka/bingo or -h on how to add, remove or change binaries dependencies.
9+
* See <https://github.com/bwplotka/bingo> or -h on how to add, remove or change binaries dependencies.
1110

1211
## Requirements
1312

14-
* Go 1.14+
13+
* Go 1.24.x or 1.25.x

.bingo/Variables.mk

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.9. DO NOT EDIT.
1+
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.10. DO NOT EDIT.
22
# All tools are designed to be build inside $GOBIN.
33
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
44
GOPATH ?= $(shell go env GOPATH)
55
GOBIN ?= $(firstword $(subst :, ,${GOPATH}))/bin
66
GO ?= $(shell which go)
77

8+
# Ensure bingo-managed tools are always built for the host platform,
9+
# even when GOOS/GOARCH are set for cross-compilation of other targets.
10+
GOHOSTOS ?= $(shell $(GO) env GOHOSTOS)
11+
GOHOSTARCH ?= $(shell $(GO) env GOHOSTARCH)
12+
GOHOSTARM ?= $(shell $(GO) env GOHOSTARM)
13+
814
# Below generated variables ensure that every time a tool under each variable is invoked, the correct version
915
# will be used; reinstalling only if needed.
1016
# For example for bingo variable:
@@ -21,83 +27,83 @@ BINGO := $(GOBIN)/bingo-v0.9.0
2127
$(BINGO): $(BINGO_DIR)/bingo.mod
2228
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
2329
@echo "(re)installing $(GOBIN)/bingo-v0.9.0"
24-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.9.0 "github.com/bwplotka/bingo"
30+
@cd $(BINGO_DIR) && GOWORK=off GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) GOARM=$(GOHOSTARM) $(GO) build -mod=mod -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.9.0 "github.com/bwplotka/bingo"
2531

2632
CONTROLLER_GEN := $(GOBIN)/controller-gen-v0.19.0
2733
$(CONTROLLER_GEN): $(BINGO_DIR)/controller-gen.mod
2834
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
2935
@echo "(re)installing $(GOBIN)/controller-gen-v0.19.0"
30-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=controller-gen.mod -o=$(GOBIN)/controller-gen-v0.19.0 "sigs.k8s.io/controller-tools/cmd/controller-gen"
36+
@cd $(BINGO_DIR) && GOWORK=off GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) GOARM=$(GOHOSTARM) $(GO) build -mod=mod -modfile=controller-gen.mod -o=$(GOBIN)/controller-gen-v0.19.0 "sigs.k8s.io/controller-tools/cmd/controller-gen"
3137

3238
CRD_DIFF := $(GOBIN)/crd-diff-v0.5.0
3339
$(CRD_DIFF): $(BINGO_DIR)/crd-diff.mod
3440
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
3541
@echo "(re)installing $(GOBIN)/crd-diff-v0.5.0"
36-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=crd-diff.mod -o=$(GOBIN)/crd-diff-v0.5.0 "sigs.k8s.io/crdify"
42+
@cd $(BINGO_DIR) && GOWORK=off GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) GOARM=$(GOHOSTARM) $(GO) build -mod=mod -modfile=crd-diff.mod -o=$(GOBIN)/crd-diff-v0.5.0 "sigs.k8s.io/crdify"
3743

3844
CRD_REF_DOCS := $(GOBIN)/crd-ref-docs-v0.2.0
3945
$(CRD_REF_DOCS): $(BINGO_DIR)/crd-ref-docs.mod
4046
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
4147
@echo "(re)installing $(GOBIN)/crd-ref-docs-v0.2.0"
42-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=crd-ref-docs.mod -o=$(GOBIN)/crd-ref-docs-v0.2.0 "github.com/elastic/crd-ref-docs"
48+
@cd $(BINGO_DIR) && GOWORK=off GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) GOARM=$(GOHOSTARM) $(GO) build -mod=mod -modfile=crd-ref-docs.mod -o=$(GOBIN)/crd-ref-docs-v0.2.0 "github.com/elastic/crd-ref-docs"
4349

4450
GOJQ := $(GOBIN)/gojq-v0.12.17
4551
$(GOJQ): $(BINGO_DIR)/gojq.mod
4652
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
4753
@echo "(re)installing $(GOBIN)/gojq-v0.12.17"
48-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=gojq.mod -o=$(GOBIN)/gojq-v0.12.17 "github.com/itchyny/gojq/cmd/gojq"
54+
@cd $(BINGO_DIR) && GOWORK=off GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) GOARM=$(GOHOSTARM) $(GO) build -mod=mod -modfile=gojq.mod -o=$(GOBIN)/gojq-v0.12.17 "github.com/itchyny/gojq/cmd/gojq"
4955

50-
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v2.1.6
56+
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v2.6.2
5157
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
5258
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
53-
@echo "(re)installing $(GOBIN)/golangci-lint-v2.1.6"
54-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v2.1.6 "github.com/golangci/golangci-lint/v2/cmd/golangci-lint"
59+
@echo "(re)installing $(GOBIN)/golangci-lint-v2.6.2"
60+
@cd $(BINGO_DIR) && GOWORK=off GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) GOARM=$(GOHOSTARM) $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v2.6.2 "github.com/golangci/golangci-lint/v2/cmd/golangci-lint"
5561

5662
GORELEASER := $(GOBIN)/goreleaser-v1.26.2
5763
$(GORELEASER): $(BINGO_DIR)/goreleaser.mod
5864
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
5965
@echo "(re)installing $(GOBIN)/goreleaser-v1.26.2"
60-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=goreleaser.mod -o=$(GOBIN)/goreleaser-v1.26.2 "github.com/goreleaser/goreleaser"
66+
@cd $(BINGO_DIR) && GOWORK=off GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) GOARM=$(GOHOSTARM) $(GO) build -mod=mod -modfile=goreleaser.mod -o=$(GOBIN)/goreleaser-v1.26.2 "github.com/goreleaser/goreleaser"
6167

6268
HELM := $(GOBIN)/helm-v3.18.4
6369
$(HELM): $(BINGO_DIR)/helm.mod
6470
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
6571
@echo "(re)installing $(GOBIN)/helm-v3.18.4"
66-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=helm.mod -o=$(GOBIN)/helm-v3.18.4 "helm.sh/helm/v3/cmd/helm"
72+
@cd $(BINGO_DIR) && GOWORK=off GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) GOARM=$(GOHOSTARM) $(GO) build -mod=mod -modfile=helm.mod -o=$(GOBIN)/helm-v3.18.4 "helm.sh/helm/v3/cmd/helm"
6773

6874
KIND := $(GOBIN)/kind-v0.30.0
6975
$(KIND): $(BINGO_DIR)/kind.mod
7076
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
7177
@echo "(re)installing $(GOBIN)/kind-v0.30.0"
72-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=kind.mod -o=$(GOBIN)/kind-v0.30.0 "sigs.k8s.io/kind"
78+
@cd $(BINGO_DIR) && GOWORK=off GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) GOARM=$(GOHOSTARM) $(GO) build -mod=mod -modfile=kind.mod -o=$(GOBIN)/kind-v0.30.0 "sigs.k8s.io/kind"
7379

7480
KUSTOMIZE := $(GOBIN)/kustomize-v5.7.1
7581
$(KUSTOMIZE): $(BINGO_DIR)/kustomize.mod
7682
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
7783
@echo "(re)installing $(GOBIN)/kustomize-v5.7.1"
78-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=kustomize.mod -o=$(GOBIN)/kustomize-v5.7.1 "sigs.k8s.io/kustomize/kustomize/v5"
84+
@cd $(BINGO_DIR) && GOWORK=off GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) GOARM=$(GOHOSTARM) $(GO) build -mod=mod -modfile=kustomize.mod -o=$(GOBIN)/kustomize-v5.7.1 "sigs.k8s.io/kustomize/kustomize/v5"
7985

8086
OPERATOR_SDK := $(GOBIN)/operator-sdk-v1.41.1
8187
$(OPERATOR_SDK): $(BINGO_DIR)/operator-sdk.mod
8288
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
8389
@echo "(re)installing $(GOBIN)/operator-sdk-v1.41.1"
84-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -tags=containers_image_openpgp -ldflags=-X=github.com/operator-framework/operator-sdk/internal/version.Version=v1.41.1 -mod=mod -modfile=operator-sdk.mod -o=$(GOBIN)/operator-sdk-v1.41.1 "github.com/operator-framework/operator-sdk/cmd/operator-sdk"
90+
@cd $(BINGO_DIR) && GOWORK=off GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) GOARM=$(GOHOSTARM) $(GO) build -tags=containers_image_openpgp -ldflags=-X=github.com/operator-framework/operator-sdk/internal/version.Version=v1.41.1 -mod=mod -modfile=operator-sdk.mod -o=$(GOBIN)/operator-sdk-v1.41.1 "github.com/operator-framework/operator-sdk/cmd/operator-sdk"
8591

8692
OPM := $(GOBIN)/opm-v1.60.0
8793
$(OPM): $(BINGO_DIR)/opm.mod
8894
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
8995
@echo "(re)installing $(GOBIN)/opm-v1.60.0"
90-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -tags=containers_image_openpgp -mod=mod -modfile=opm.mod -o=$(GOBIN)/opm-v1.60.0 "github.com/operator-framework/operator-registry/cmd/opm"
96+
@cd $(BINGO_DIR) && GOWORK=off GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) GOARM=$(GOHOSTARM) $(GO) build -tags=containers_image_openpgp -mod=mod -modfile=opm.mod -o=$(GOBIN)/opm-v1.60.0 "github.com/operator-framework/operator-registry/cmd/opm"
9197

9298
SETUP_ENVTEST := $(GOBIN)/setup-envtest-v0.0.0-20250620151452-b9a9ca01fd37
9399
$(SETUP_ENVTEST): $(BINGO_DIR)/setup-envtest.mod
94100
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
95101
@echo "(re)installing $(GOBIN)/setup-envtest-v0.0.0-20250620151452-b9a9ca01fd37"
96-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=setup-envtest.mod -o=$(GOBIN)/setup-envtest-v0.0.0-20250620151452-b9a9ca01fd37 "sigs.k8s.io/controller-runtime/tools/setup-envtest"
102+
@cd $(BINGO_DIR) && GOWORK=off GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) GOARM=$(GOHOSTARM) $(GO) build -mod=mod -modfile=setup-envtest.mod -o=$(GOBIN)/setup-envtest-v0.0.0-20250620151452-b9a9ca01fd37 "sigs.k8s.io/controller-runtime/tools/setup-envtest"
97103

98104
YAMLFMT := $(GOBIN)/yamlfmt-v0.20.0
99105
$(YAMLFMT): $(BINGO_DIR)/yamlfmt.mod
100106
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
101107
@echo "(re)installing $(GOBIN)/yamlfmt-v0.20.0"
102-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=yamlfmt.mod -o=$(GOBIN)/yamlfmt-v0.20.0 "github.com/google/yamlfmt/cmd/yamlfmt"
108+
@cd $(BINGO_DIR) && GOWORK=off GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) GOARM=$(GOHOSTARM) $(GO) build -mod=mod -modfile=yamlfmt.mod -o=$(GOBIN)/yamlfmt-v0.20.0 "github.com/google/yamlfmt/cmd/yamlfmt"
103109

.bingo/golangci-lint.mod

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
22

3-
go 1.24.2
3+
go 1.24.6
44

5-
toolchain go1.24.3
6-
7-
require github.com/golangci/golangci-lint/v2 v2.1.6 // cmd/golangci-lint
5+
require github.com/golangci/golangci-lint/v2 v2.6.2 // cmd/golangci-lint

0 commit comments

Comments
 (0)