Skip to content

Commit 959004e

Browse files
committed
Migrate for v2
1 parent 7fd99f4 commit 959004e

File tree

4 files changed

+33
-29
lines changed

4 files changed

+33
-29
lines changed

.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@v8
2222
with:
23-
version: v2.1
23+
version: v2.1.6

.golangci.yml

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,14 @@
1+
version: "2"
12
run:
2-
timeout: 5m
33
allow-parallel-runners: true
4-
5-
issues:
6-
# don't skip warning about doc comments
7-
# don't exclude the default set of lint
8-
exclude-use-default: false
9-
# restore some of the defaults
10-
# (fill in the rest as needed)
11-
exclude-rules:
12-
- path: "api/*"
13-
linters:
14-
- lll
15-
- path: "internal/*"
16-
linters:
17-
- dupl
18-
- lll
194
linters:
20-
disable-all: true
5+
default: none
216
enable:
227
- dupl
238
- errcheck
24-
- exportloopref
259
- ginkgolinter
2610
- goconst
2711
- gocyclo
28-
- gofmt
29-
- goimports
30-
- gosimple
3112
- govet
3213
- ineffassign
3314
- lll
@@ -36,12 +17,34 @@ linters:
3617
- prealloc
3718
- revive
3819
- staticcheck
39-
- typecheck
4020
- unconvert
4121
- unparam
4222
- unused
43-
44-
linters-settings:
45-
revive:
23+
settings:
24+
revive:
25+
rules:
26+
- name: comment-spacings
27+
exclusions:
28+
generated: lax
4629
rules:
47-
- name: comment-spacings
30+
- linters:
31+
- lll
32+
path: api/*
33+
- linters:
34+
- dupl
35+
- lll
36+
path: internal/*
37+
paths:
38+
- third_party$
39+
- builtin$
40+
- examples$
41+
formatters:
42+
enable:
43+
- gofmt
44+
- goimports
45+
exclusions:
46+
generated: lax
47+
paths:
48+
- third_party$
49+
- builtin$
50+
- examples$

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint
173173
KUSTOMIZE_VERSION ?= v5.4.3
174174
CONTROLLER_TOOLS_VERSION ?= v0.16.4
175175
ENVTEST_VERSION ?= release-0.19
176-
GOLANGCI_LINT_VERSION ?= v1.59.1
176+
GOLANGCI_LINT_VERSION ?= v2.1.6
177177

178178
.PHONY: kustomize
179179
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
@@ -193,7 +193,7 @@ $(ENVTEST): $(LOCALBIN)
193193
.PHONY: golangci-lint
194194
golangci-lint: $(GOLANGCI_LINT) ## Download golangci-lint locally if necessary.
195195
$(GOLANGCI_LINT): $(LOCALBIN)
196-
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION))
196+
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/v2/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION))
197197

198198
# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
199199
# $1 - target path with name of binary

config/default/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ images:
4545
- name: controller
4646
newTag: main
4747
newName: ghcr.io/miscord-dev/dexchange
48+
digest: sha256:6fe19ae37223e322eac2d0ce6cd8db5899115f011881e50e69326848b8648f40
4849

4950
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
5051
# crd/kustomization.yaml

0 commit comments

Comments
 (0)