Skip to content

Commit 164ede3

Browse files
golangci-lint v2
* Bump golangci/golangci-lint-action from 6 to 7 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6 to 7. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@v6...v7) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * golangci-lint v2 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: bakito <[email protected]>
1 parent e86b59f commit 164ede3

File tree

4 files changed

+47
-44
lines changed

4 files changed

+47
-44
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ jobs:
1818
with:
1919
go-version-file: "go.mod"
2020

21-
- name: golangci-lint
22-
uses: golangci/golangci-lint-action@v6
23-
with:
24-
skip-cache: true
21+
- name: Lint
22+
run: make lint
2523

2624
build:
2725
name: go Test

.golangci.yaml

Lines changed: 40 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,42 @@
1-
run:
2-
timeout: 5m
3-
1+
version: "2"
42
linters:
53
enable:
6-
- asciicheck
7-
- bodyclose
8-
- dogsled
9-
- durationcheck
10-
- errcheck
11-
- errorlint
12-
- gci
13-
- gofmt
14-
- gofumpt
15-
- goimports
16-
- gosec
17-
- gosimple
18-
- govet
19-
- importas
20-
- ineffassign
21-
- misspell
22-
- nakedret
23-
- nolintlint
24-
#- revive
25-
- staticcheck
26-
- unconvert
27-
- unparam
28-
- unused
29-
- wastedassign
30-
linters-settings:
31-
gosec:
32-
# Exclude generated files
33-
exclude-generated: true
34-
gofmt:
35-
# simplify code: gofmt with `-s` option, true by default
36-
simplify: true
37-
4+
- asciicheck
5+
- bodyclose
6+
- dogsled
7+
- durationcheck
8+
- errorlint
9+
- gosec
10+
- importas
11+
- misspell
12+
- nakedret
13+
- nolintlint
14+
- unconvert
15+
- unparam
16+
- wastedassign
17+
exclusions:
18+
generated: lax
19+
presets:
20+
- comments
21+
- common-false-positives
22+
- legacy
23+
- std-error-handling
24+
paths:
25+
- third_party$
26+
- builtin$
27+
- examples$
28+
formatters:
29+
enable:
30+
- gci
31+
- gofmt
32+
- gofumpt
33+
- goimports
34+
settings:
35+
gofmt:
36+
simplify: true
37+
exclusions:
38+
generated: lax
39+
paths:
40+
- third_party$
41+
- builtin$
42+
- examples$

.toolbox.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ TB_HELM_DOCS ?= $(TB_LOCALBIN)/helm-docs
1515
TB_SEMVER ?= $(TB_LOCALBIN)/semver
1616

1717
## Tool Versions
18-
TB_GOLANGCI_LINT_VERSION ?= v1.64.5
19-
TB_GORELEASER_VERSION ?= v2.7.0
18+
TB_GOLANGCI_LINT_VERSION ?= v2.0.2
19+
TB_GORELEASER_VERSION ?= v2.8.1
2020
TB_HELM_DOCS_VERSION ?= v1.14.2
2121
TB_SEMVER_VERSION ?= v1.1.3
2222

2323
## Tool Installer
2424
.PHONY: tb.golangci-lint
2525
tb.golangci-lint: $(TB_GOLANGCI_LINT) ## Download golangci-lint locally if necessary.
2626
$(TB_GOLANGCI_LINT): $(TB_LOCALBIN)
27-
test -s $(TB_LOCALBIN)/golangci-lint || GOBIN=$(TB_LOCALBIN) go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(TB_GOLANGCI_LINT_VERSION)
27+
test -s $(TB_LOCALBIN)/golangci-lint || GOBIN=$(TB_LOCALBIN) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(TB_GOLANGCI_LINT_VERSION)
2828
.PHONY: tb.goreleaser
2929
tb.goreleaser: $(TB_GORELEASER) ## Download goreleaser locally if necessary.
3030
$(TB_GORELEASER): $(TB_LOCALBIN)
@@ -51,7 +51,7 @@ tb.reset:
5151
.PHONY: tb.update
5252
tb.update: tb.reset
5353
toolbox makefile -f $(TB_LOCALDIR)/Makefile \
54-
github.com/golangci/golangci-lint/cmd/golangci-lint \
54+
github.com/golangci/golangci-lint/v2/cmd/golangci-lint \
5555
github.com/goreleaser/goreleaser/v2 \
5656
github.com/norwoodj/helm-docs/cmd/helm-docs \
5757
github.com/bakito/semver

pkg/configmap/webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func (w *Webhook) Default(ctx context.Context, obj runtime.Object) error {
100100
allPems = append(allPems, pems...)
101101
}
102102

103-
b, _ := exportCerts(allPems, pass, cm.ObjectMeta.CreationTimestamp.Time)
103+
b, _ := exportCerts(allPems, pass, cm.CreationTimestamp.Time)
104104

105105
if cm.BinaryData == nil {
106106
cm.BinaryData = make(map[string][]byte)

0 commit comments

Comments
 (0)