File tree Expand file tree Collapse file tree 5 files changed +55
-17
lines changed
Expand file tree Collapse file tree 5 files changed +55
-17
lines changed Original file line number Diff line number Diff line change 5151
5252 - name : Run linter
5353 env :
54- GOLANGCI_LINT_FLAGS : --out-format=github-actions
54+ GOLANGCI_LINT_FLAGS : --output.text.path=stdout
5555 run : |
5656 make lint
Original file line number Diff line number Diff line change 1- # options for analysis running
1+ version : " 2 "
22run :
3- timeout : 8m
4-
53 build-tags :
64 - hack
7- skip-dirs-use-default : false
8- skip-files :
9- - " zz_*"
10- tests : true
115 modules-download-mode : readonly
6+ tests : true
127 allow-parallel-runners : true
13-
148linters :
9+ default : none
10+ enable :
11+ - depguard
12+ - goheader
13+ - revive
14+ settings :
15+ revive :
16+ rules :
17+ # The following rules are recommended https://github.com/mgechev/revive#recommended-configuration
18+ - name : blank-imports
19+ - name : context-as-argument
20+ - name : context-keys-type
21+ - name : dot-imports
22+ - name : error-return
23+ - name : error-strings
24+ - name : error-naming
25+ - name : exported
26+ - name : if-return
27+ - name : increment-decrement
28+ - name : var-naming
29+ - name : var-declaration
30+ - name : package-comments
31+ - name : range
32+ - name : receiver-naming
33+ - name : time-naming
34+ - name : unexported-return
35+ - name : indent-error-flow
36+ - name : errorf
37+ - name : empty-block
38+ - name : superfluous-else
39+ - name : unused-parameter
40+ - name : unreachable-code
41+ - name : redefines-builtin-id
42+ exclusions :
43+ generated : strict
44+ paths :
45+ # Ignore issues in generated files.
46+ - zz_generated.*\.go$
47+ formatters :
1548 enable :
16- - depguard # Checks if package imports are in a list of acceptable packages
17- - gofmt # Checks whether code was gofmt-ed
18- - goheader # Checks is file headers matche a given pattern
19- - revive # Stricter drop-in replacement for golint
49+ - gofmt
50+ exclusions :
51+ generated : strict
52+ paths :
53+ - zz_generated.*\.go$
54+ # Warn only about new issues, not existing ones.
55+ # TODO: Remove this filter at some point and ensure all old issues are fixed.
56+ issues :
57+ new-from-merge-base : HEAD~
Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ lint: hack/lint/.golangci-lint.stamp
307307 --rm \
308308 -v " $( CURDIR) :/go/src/github.com/k0sproject/k0smotron:ro" \
309309 -w /go/src/github.com/k0sproject/k0smotron \
310- k0smotron.golangci-lint golangci-lint run $(GOLANGCI_LINT_FLAGS ) $(GO_LINT_DIRS )
310+ k0smotron.golangci-lint golangci-lint run --config .golangci.yml $(GOLANGCI_LINT_FLAGS ) $(GO_LINT_DIRS )
311311
312312# KinD helpers
313313.PHONY : kind-cluster
Original file line number Diff line number Diff line change 11KUSTOMIZE_VERSION ?= v5.0.1
22CONTROLLER_TOOLS_VERSION ?= v0.14.0
3- GO_VERSION ?= 1.22.6
4- GOLANGCILINT_VERSION ?= 1.52.2
3+ GO_VERSION ?= 1.23.0
4+ GOLANGCILINT_VERSION ?= 2.3.0
55CRDOC_VERSION ?= v0.6.2
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ ARG BUILD_IMG
33FROM ${BUILD_IMG} AS builder
44ARG GOLANGCILINT_VERSION
55
6- RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v${GOLANGCILINT_VERSION}
6+ RUN go install github.com/golangci/golangci-lint/v2/ cmd/golangci-lint@v${GOLANGCILINT_VERSION}
77
88# Ref https://github.com/golangci/golangci-lint/pull/4034
99RUN git config --global --add safe.directory '*'
You can’t perform that action at this time.
0 commit comments