Skip to content

Commit eceb585

Browse files
Merge pull request openshift#7635 from vincepri/bump-golanci-lint
hack/go-lint: update golanci-lint to v1.53.1
2 parents 84d8873 + b199f34 commit eceb585

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

.golangci.yaml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ run:
99
- ^scripts
1010
- ^terraform
1111
- ^upi
12-
go: '1.19'
12+
go: '1.20'
1313
modules-download-mode: vendor
14+
allow-parallel-runners: true
1415
output:
1516
print-linter-name: true
1617
sort-results: true
@@ -20,7 +21,6 @@ linters:
2021
- asciicheck
2122
- containedctx
2223
- decorder
23-
- depguard
2424
- dogsled
2525
- errcheck
2626
- errorlint
@@ -128,7 +128,37 @@ linters-settings:
128128
# It's a comma-separated list of prefixes.
129129
# Default: ""
130130
local-prefixes: github.com/openshift
131+
revive:
132+
rules:
133+
# The following rules are recommended https://github.com/mgechev/revive#recommended-configuration
134+
- name: blank-imports
135+
- name: context-as-argument
136+
- name: context-keys-type
137+
- name: dot-imports
138+
- name: error-return
139+
- name: error-strings
140+
- name: error-naming
141+
- name: exported
142+
- name: if-return
143+
- name: increment-decrement
144+
- name: var-naming
145+
- name: var-declaration
146+
- name: range
147+
- name: receiver-naming
148+
- name: time-naming
149+
- name: unexported-return
150+
- name: indent-error-flow
151+
- name: errorf
152+
- name: superfluous-else
153+
- name: unreachable-code
154+
- name: redefines-builtin-id
155+
- name: bool-literal-in-expr
156+
- name: constant-logical-expr
131157
issues:
132158
include:
133159
- EXC0012 # EXC0012 revive: issue about not having a comment on exported.
134160
- EXC0014 # EXC0014 revive: issue about not having a comment in the right format.
161+
exclude-rules:
162+
- linters:
163+
- goconst
164+
path: _test\.go

hack/go-lint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ podman run --rm \
55
--env IS_CONTAINER=TRUE \
66
--volume "${PWD}:/go/src/github.com/openshift/installer:z" \
77
--workdir /go/src/github.com/openshift/installer \
8-
docker.io/golangci/golangci-lint:v1.48.0 \
9-
golangci-lint run "${@}"
8+
docker.io/golangci/golangci-lint:v1.53.1 \
9+
golangci-lint run --new-from-rev=dcf8122 "${@}"

0 commit comments

Comments
 (0)