forked from opendatahub-io/opendatahub-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
166 lines (166 loc) · 4.4 KB
/
.golangci.yml
File metadata and controls
166 lines (166 loc) · 4.4 KB
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
version: "2"
linters:
default: all
disable:
- cyclop
- depguard
- err113
- exhaustruct
- forbidigo
- funlen
- gochecknoglobals
- gocognit
- godox
- gomoddirectives
- mnd
- nestif
- nilnil
- nlreturn
- paralleltest
- tagliatelle
- varnamelen
- wrapcheck
- wsl
- wsl_v5
- funcorder
- godoclint
- noinlineerr
settings:
errcheck:
check-type-assertions: true
exhaustive:
check:
- switch
default-signifies-exhaustive: true
funlen:
lines: 100
statements: 100
ignore-comments: true
goconst:
ignore-string-values:
- "true"
- "false"
gocritic:
enabled-checks:
- deferInLoop
- unnecessaryDefer
gocyclo:
min-complexity: 30
importas:
alias:
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/api/dscinitialization/v1
alias: dsciv1
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/api/dscinitialization/v2
alias: dsciv2
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/api/datasciencecluster/v1
alias: dscv1
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/api/datasciencecluster/v2
alias: dscv2
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/api/infrastructure/v1
alias: infrav1
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/api/components/v1alpha1
alias: componentApi
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/api/services/v1alpha1
alias: serviceApi
- pkg: k8s.io/apimachinery/pkg/api/errors
alias: k8serr
- pkg: k8s.io/api/(\w+)/(v[\w\d]+)
alias: $1$2
- pkg: github.com/openshift/api/(\w+)/(v[\w\d]+)
alias: $1$2
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/internal/controller/datasciencecluster
alias: dscctrl
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/internal/controller/dscinitialization
alias: dscictrl
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/internal/controller/components/registry
alias: cr
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/internal/controller/components/(\w+)
alias: ${1}ctrl
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/internal/controller/services/registry
alias: sr
- pkg: github.com/opendatahub-io/opendatahub-operator/v2/internal/controller/services/(\w+)
alias: ${1}ctrl
ireturn:
allow:
- anon
- error
- empty
- stdlib
- generic
- EventHandler
- discovery.DiscoveryInterface
- dynamic.Interface
- predicate.Predicate
- client.Object
- client.Client
- client.SubResourceClient
- client.SubResourceWriter
- meta.RESTMapper
- common.PlatformObject
- types.AsyncAssertion
- kubernetes.Interface
- gomega.AsyncAssertion
- labels.Selector
- manager.Manager
- types.GomegaMatcher
lll:
line-length: 180
nolintlint:
require-specific: true
allow-no-explanation:
- funlen
- lll
perfsprint:
sprintf1: false
strconcat: false
revive:
rules:
- name: dot-imports
arguments:
- allowedPackages:
- github.com/onsi/ginkgo/v2
- github.com/onsi/gomega
- github.com/onsi/gomega/gstruct
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- dupl
path: tests/*/(.+)_test\.go
- linters:
- containedctx
path: pkg/utils/test/testf/(.+)\.go
- linters:
- lll
path: internal/controller/cloudmanager/common/kubebuilder_rbac.go
paths:
- api
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofmt
- goimports
settings:
gci:
sections:
- standard
- default
- prefix(github.com/opendatahub-io/opendatahub-operator)
- blank
- dot
custom-order: true
exclusions:
generated: lax
paths:
- api
- third_party$
- builtin$
- examples$