Skip to content

Commit b56ccad

Browse files
✨ Upgrade golangci-lint from v1.61.0 to v1.62.2 (#4448)
Upgrade golangci-lint from v1.61.0 to v1.62.2
1 parent 6fb374f commit b56ccad

File tree

18 files changed

+26
-26
lines changed

18 files changed

+26
-26
lines changed

.github/workflows/lint-sample.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Run linter
3333
uses: golangci/golangci-lint-action@v6
3434
with:
35-
version: v1.61.0
35+
version: v1.62.2
3636
working-directory: ${{ matrix.folder }}
3737
args: --config .golangci.yml ./...
3838
- name: Run linter via makefile target

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Run linter
2525
uses: golangci/golangci-lint-action@v6
2626
with:
27-
version: v1.61
27+
version: v1.62.2
2828

2929
yamllint:
3030
runs-on: ubuntu-latest

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
114114
golangci-lint:
115115
@[ -f $(GOLANGCI_LINT) ] || { \
116116
set -e ;\
117-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) v1.61.0 ;\
117+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) v1.62.2 ;\
118118
}
119119

120120
.PHONY: apidiff

docs/book/src/cronjob-tutorial/testdata/project/.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
- name: Run linter
2121
uses: golangci/golangci-lint-action@v6
2222
with:
23-
version: v1.61.0
23+
version: v1.62.2

docs/book/src/cronjob-tutorial/testdata/project/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ CONTROLLER_TOOLS_VERSION ?= v0.16.5
178178
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
179179
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
180180
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
181-
GOLANGCI_LINT_VERSION ?= v1.61.0
181+
GOLANGCI_LINT_VERSION ?= v1.62.2
182182

183183
.PHONY: kustomize
184184
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.

docs/book/src/getting-started/testdata/project/.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
- name: Run linter
2121
uses: golangci/golangci-lint-action@v6
2222
with:
23-
version: v1.61.0
23+
version: v1.62.2

docs/book/src/getting-started/testdata/project/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ CONTROLLER_TOOLS_VERSION ?= v0.16.5
174174
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
175175
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
176176
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
177-
GOLANGCI_LINT_VERSION ?= v1.61.0
177+
GOLANGCI_LINT_VERSION ?= v1.62.2
178178

179179
.PHONY: kustomize
180180
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.

docs/book/src/multiversion-tutorial/testdata/project/.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
- name: Run linter
2121
uses: golangci/golangci-lint-action@v6
2222
with:
23-
version: v1.61.0
23+
version: v1.62.2

docs/book/src/multiversion-tutorial/testdata/project/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ CONTROLLER_TOOLS_VERSION ?= v0.16.5
178178
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
179179
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
180180
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
181-
GOLANGCI_LINT_VERSION ?= v1.61.0
181+
GOLANGCI_LINT_VERSION ?= v1.62.2
182182

183183
.PHONY: kustomize
184184
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.

pkg/plugin/util/util.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ func EnsureExistAndReplace(input, match, replace string) (string, error) {
227227
}
228228

229229
// ReplaceInFile replaces all instances of old with new in the file at path.
230-
func ReplaceInFile(path, old, new string) error {
230+
func ReplaceInFile(path, oldValue, newValue string) error {
231231
info, err := os.Stat(path)
232232
if err != nil {
233233
return err
@@ -238,10 +238,10 @@ func ReplaceInFile(path, old, new string) error {
238238
if err != nil {
239239
return err
240240
}
241-
if !strings.Contains(string(b), old) {
241+
if !strings.Contains(string(b), oldValue) {
242242
return errors.New("unable to find the content to be replaced")
243243
}
244-
s := strings.Replace(string(b), old, new, -1)
244+
s := strings.Replace(string(b), oldValue, newValue, -1)
245245
err = os.WriteFile(path, []byte(s), info.Mode())
246246
if err != nil {
247247
return err

0 commit comments

Comments
 (0)