forked from openshift-kni/eco-gotests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
244 lines (240 loc) · 7.63 KB
/
.golangci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
run:
timeout: 15m0s
skip-dirs-use-default: true
fast: false
# modules-download-mode: readonly
linters-settings:
misspell:
ignore-words:
- "nto"
revive:
rules:
- name: indent-error-flow
- name: var-naming
- name: increment-decrement
- name: exported
arguments:
- disableStutteringCheck
depguard:
# list-type: blacklist
# include-go-root: false
# packages:
# - "github.com/onsi**"
rules:
main:
deny:
- pkg: "github.com/onsi**"
allow:
- "k8s.io/apimachinery"
- "k8s.io/api"
- "k8s.io/kubelet"
- "k8s.io/utils"
- "k8s.io/client-go"
- "github.com/kelseyhightower"
- "github.com/Juniper/go-netconf"
- "github.com/openshift"
- "github.com/nmstate/kubernetes-nmstate"
- "github.com/hashicorp/go-version"
- "github.com/cavaliergopher/grab/v3"
- "github.com/k8snetworkplumbingwg"
- "github.com/metallb/metallb-operator"
- "github.com/metal3-io/baremetal-operator"
- "github.com/operator-framework/operator-lifecycle-manager"
- "github.com/grafana-operator/grafana-operator"
- "github.com/NVIDIA/gpu-operator"
- "github.com/operator-framework/api"
- "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
- "github.com/vmware-tanzu/velero/pkg/generated/clientset/versioned/scheme"
- "github.com/golang/glog"
- "github.com/rh-ecosystem-edge/kernel-module-management"
- "github.com/povsister/scp"
- "maistra.io/api"
- "open-cluster-management.io/governance-policy-propagator/api"
- "open-cluster-management.io/config-policy-controller/api"
- "open-cluster-management.io/multicloud-operators-subscription/pkg/apis"
- "sigs.k8s.io/controller-runtime"
- $gostd
- "github.com/stretchr/testify"
- "github.com/stmcginnis/gofish"
- "github.com/BurntSushi/toml"
- "github.com/containers/image/v5/pkg/sysregistriesv2"
wsl:
strict-append: false
gofmt:
simplify: true
funlen:
lines: 90
statements: 40
unused:
check-exported: true
go: "1.23"
stylecheck:
dot-import-whitelist:
- github.com/onsi/gomega
- github.com/onsi/ginkgo/v2
- github.com/openshift-kni/eco-gotests/tests/internal/inittools
- github.com/openshift-kni/eco-gotests/tests/cnf/core/network/internal/netinittools
- github.com/openshift-kni/eco-gotests/tests/cnf/ran/internal/raninittools
- github.com/openshift-kni/eco-gotests/tests/assisted/ztp/internal/ztpinittools
- github.com/openshift-kni/eco-gotests/tests/system-tests/ipsec/internal/ipsecinittools
- github.com/openshift-kni/eco-gotests/tests/system-tests/ran-du/internal/randuinittools
- github.com/openshift-kni/eco-gotests/tests/system-tests/internal/systemtestsinittools
- github.com/openshift-kni/eco-gotests/tests/system-tests/spk/internal/spkinittools
- github.com/openshift-kni/eco-gotests/tests/system-tests/vcore/internal/vcoreinittools
- github.com/openshift-kni/eco-gotests/tests/lca/imagebasedupgrade/cnf/internal/cnfinittools
- github.com/openshift-kni/eco-gotests/tests/hw-accel/kmm/internal/kmminittools
- github.com/openshift-kni/eco-gotests/tests/rhwa/internal/rhwainittools
- github.com/openshift-kni/eco-gotests/tests/system-tests/rdscore/internal/rdscoreinittools
- github.com/openshift-kni/eco-gotests/tests/lca/imagebasedupgrade/mgmt/internal/mgmtinittools
- github.com/openshift-kni/eco-gotests/tests/accel/internal/accelinittools
- github.com/openshift-kni/eco-gotests/tests/lca/imagebasedinstall/mgmt/internal/mgmtinittools
- github.com/openshift-kni/eco-gotests/tests/system-tests/diskencryption/internal/diskencryptioninittools
# Select the Go version to target. The default is '1.13'.
go: "1.23"
# https://staticcheck.io/docs/options#checks
checks:
- all
- ST1001
linters:
disable:
- ireturn
- structcheck
enable:
- asciicheck
- bidichk
- depguard
- durationcheck
- errcheck
- errname
- errorlint
- exhaustive
- forcetypeassert
- funlen
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- godox
- gofmt
- goheader
- goimports
- gomodguard
- goprintffuncname
- gosimple
- govet
- importas
- ineffassign
- lll
- makezero
- misspell
- nakedret
- nilnil
- nolintlint
- predeclared
- promlinter
- revive
- staticcheck
- stylecheck
- tenv
- thelper
- typecheck
- unconvert
- unparam
- unused
- varnamelen
- wsl
- nlreturn
output:
format: colored-line-number
issues:
exclude:
- "can't run linter goanalysis_metalinter: inspect: failed to load"
max-issues-per-linter: 0
max-same-issues: 0
new: false
include:
- EXC0002 # disable excluding of issues about comments from golint
- EXC0012 # EXC0012 revive: Annoying issue about not having a comment. The rare codebase has such comments
- EXC0014 # EXC0014 revive: Annoying issue about not having a comment. The rare codebase has such comments
exclude-rules:
#- # Exclude some linters from running on tests files.
- path: 'tests/internal/inittools'
linters:
- gochecknoinits
- path: 'tests/accel/internal/accelinittools'
linters:
- gochecknoinits
- path: 'tests/cnf/core/network/internal/netinittools'
linters:
- gochecknoinits
- path: 'tests/cnf/ran/internal/raninittools'
linters:
- gochecknoinits
- path: 'tests/assisted/ztp/internal/ztpinittools'
linters:
- gochecknoinits
- path: 'tests/system-tests/ipsec/internal/ipsecinittools'
linters:
- gochecknoinits
- path: 'tests/system-tests/ran-du/internal/randuinittools'
linters:
- gochecknoinits
- path: 'tests/system-tests/rdscore/internal/rdscoreinittools'
linters:
- gochecknoinits
- path: 'tests/system-tests/internal/systemtestsinittools'
linters:
- gochecknoinits
- path: 'tests/system-tests/spk/internal/spkinittools'
linters:
- gochecknoinits
- path: 'tests/system-tests/vcore/internal/vcoreinittools'
linters:
- gochecknoinits
- path: 'tests/lca/imagebasedupgrade/cnf/internal/cnfinittools'
linters:
- gochecknoinits
- path: 'tests/hw-accel/kmm/internal/kmminittools'
linters:
- gochecknoinits
- path: 'tests/rhwa/internal/rhwainittools'
linters:
- gochecknoinits
- path: 'tests/system-tests/diskencryption/internal/diskencryptioninittools'
linters:
- gochecknoinits
- path: 'tests/lca/imagebasedupgrade/mgmt/internal/mgmtinittools'
linters:
- gochecknoinits
- path: 'tests/lca/imagebasedinstall/mgmt/internal/mgmtinittools'
linters:
- gochecknoinits
- path: "tests/internal/inittools"
linters:
- depguard
- path: 'tests/internal/reporter'
linters:
- depguard
- path: 'tests/system-tests/internal/ocpcli'
linters:
- depguard
- path: "tests/.*/tests/.*"
linters:
- depguard
- path: "tests/.*/.*suite_test.go"
linters:
- depguard
- path: "tests/system-tests/rdscore/internal/.*"
linters:
- depguard
- path: "tests/system-tests/spk/internal/.*"
linters:
- depguard
- path: "tests/system-tests/vcore/internal/.*"
linters:
- depguard
- path: "tests/lca/imagebasedupgrade/cnf/internal/validations"
linters:
- depguard