Skip to content

Commit 99313db

Browse files
authored
Merge pull request #4801 from ansh-devs/master
✨Update golangci-lint to v2.1.0 and lint-action to v8
2 parents fd63e2b + 04ea364 commit 99313db

File tree

21 files changed

+28
-30
lines changed

21 files changed

+28
-30
lines changed

.github/workflows/lint-sample.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ jobs:
3636
working-directory: ${{ matrix.folder }}
3737
run: make lint-config
3838
- name: Run linter
39-
uses: golangci/golangci-lint-action@v7
39+
uses: golangci/golangci-lint-action@v8
4040
with:
41-
version: v2.0.2
41+
version: v2.1.0
4242
working-directory: ${{ matrix.folder }}
4343
args: --config .golangci.yml ./...
4444
- name: Run linter via makefile target

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
- name: Check linter configuration
2525
run: make lint-config
2626
- name: Run linter
27-
uses: golangci/golangci-lint-action@v7
27+
uses: golangci/golangci-lint-action@v8
2828
with:
29-
version: v2.0.2
29+
version: v2.1.0
3030

3131
yamllint:
3232
runs-on: ubuntu-latest

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ yamllint:
127127
GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
128128
golangci-lint:
129129
@[ -f $(GOLANGCI_LINT) ] || { \
130-
GOBIN=$(shell pwd)/bin go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.0.2 ;\
130+
GOBIN=$(shell pwd)/bin go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.0 ;\
131131
}
132132

133133
.PHONY: apidiff

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
go-version-file: go.mod
1919

2020
- name: Run linter
21-
uses: golangci/golangci-lint-action@v7
21+
uses: golangci/golangci-lint-action@v8
2222
with:
23-
version: v2.0.2
23+
version: v2.1.0

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ CONTROLLER_TOOLS_VERSION ?= v0.17.3
189189
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
190190
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
191191
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
192-
GOLANGCI_LINT_VERSION ?= v2.0.2
192+
GOLANGCI_LINT_VERSION ?= v2.1.0
193193

194194
.PHONY: kustomize
195195
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
go-version-file: go.mod
1919

2020
- name: Run linter
21-
uses: golangci/golangci-lint-action@v7
21+
uses: golangci/golangci-lint-action@v8
2222
with:
23-
version: v2.0.2
23+
version: v2.1.0

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ CONTROLLER_TOOLS_VERSION ?= v0.17.3
185185
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
186186
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
187187
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
188-
GOLANGCI_LINT_VERSION ?= v2.0.2
188+
GOLANGCI_LINT_VERSION ?= v2.1.0
189189

190190
.PHONY: kustomize
191191
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
go-version-file: go.mod
1919

2020
- name: Run linter
21-
uses: golangci/golangci-lint-action@v7
21+
uses: golangci/golangci-lint-action@v8
2222
with:
23-
version: v2.0.2
23+
version: v2.1.0

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ CONTROLLER_TOOLS_VERSION ?= v0.17.3
189189
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
190190
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
191191
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
192-
GOLANGCI_LINT_VERSION ?= v2.0.2
192+
GOLANGCI_LINT_VERSION ?= v2.1.0
193193

194194
.PHONY: kustomize
195195
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.

pkg/plugins/common/kustomize/v2/scaffolds/api.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ func (s *apiScaffolder) Scaffold() error {
9191
}
9292
}
9393

94-
//nolint:goconst
95-
kustomizeFilePath := "config/default/kustomization.yaml"
9694
err := pluginutil.UncommentCode(kustomizeFilePath, "#- ../crd", `#`)
9795
if err != nil {
9896
hasCRUncommented, errCheck := pluginutil.HasFileContentWith(kustomizeFilePath, "- ../crd")

0 commit comments

Comments
 (0)