-
Notifications
You must be signed in to change notification settings - Fork 33
/
.golangci.yml
183 lines (177 loc) · 6.96 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
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
linters-settings:
lll:
line-length: 190
funlen:
lines: 180
statements: 70
gocognit:
min-complexity: 60
golint:
# godoc says that one of files from a package should contain package comment.
# but golint has constraint that checks package comment in every file of the package.
# golint developers mention that this is imperfection. https://github.com/golang/lint/blob/master/lint.go#L376
# To prevent this checking set min-confidence level to 0.3
min-confidence: 0.3
depguard:
rules:
main:
files:
- $all
- "!$test"
allow:
- $gostd
- github.com/antonfisher/nested-logrus-formatter
- github.com/container-storage-interface/spec/lib/go/csi
- github.com/dell/csi-baremetal/api/generated/v1
- github.com/dell/csi-baremetal/api/v1
- github.com/dell/csi-baremetal/api/v1/availablecapacitycrd
- github.com/dell/csi-baremetal/api/v1/drivecrd
- github.com/dell/csi-baremetal/api/v1/lvgcrd
- github.com/dell/csi-baremetal/api/v1/nodecrd
- github.com/dell/csi-baremetal/api/v1/storagegroupcrd
- github.com/dell/csi-baremetal/api/v1/volumecrd
- github.com/dell/csi-baremetal/api/smart/generated
- github.com/dell/csi-baremetal/cmd/drivemgr
- github.com/dell/csi-baremetal/pkg/base
- github.com/dell/csi-baremetal/pkg/base/error
- github.com/dell/csi-baremetal/pkg/base/featureconfig
- github.com/dell/csi-baremetal/pkg/base/k8s
- github.com/dell/csi-baremetal/pkg/base/linuxutils/datadiscover
- github.com/dell/csi-baremetal/pkg/base/linuxutils/datadiscover/types
- github.com/dell/csi-baremetal/pkg/base/linuxutils/fs
- github.com/dell/csi-baremetal/pkg/base/linuxutils/ipmi
- github.com/dell/csi-baremetal/pkg/base/linuxutils/lsblk
- github.com/dell/csi-baremetal/pkg/base/linuxutils/lsscsi
- github.com/dell/csi-baremetal/pkg/base/linuxutils/lvm
- github.com/dell/csi-baremetal/pkg/base/linuxutils/nvmecli
- github.com/dell/csi-baremetal/pkg/base/linuxutils/partitionhelper
- github.com/dell/csi-baremetal/pkg/base/linuxutils/smartctl
- github.com/dell/csi-baremetal/pkg/base/logger
- github.com/dell/csi-baremetal/pkg/base/logger/objects
- github.com/dell/csi-baremetal/pkg/base/rpc
- github.com/dell/csi-baremetal/pkg/base/util
- github.com/dell/csi-baremetal/pkg/common
- github.com/dell/csi-baremetal/pkg/controller
- github.com/dell/csi-baremetal/pkg/controller/mountoptions
- github.com/dell/csi-baremetal/pkg/controller/node
- github.com/dell/csi-baremetal/pkg/crcontrollers/drive
- github.com/dell/csi-baremetal/pkg/crcontrollers/lvg
- github.com/dell/csi-baremetal/pkg/crcontrollers/node
- github.com/dell/csi-baremetal/pkg/crcontrollers/node/common
- github.com/dell/csi-baremetal/pkg/crcontrollers/reservation
- github.com/dell/csi-baremetal/pkg/crcontrollers/storagegroup
- github.com/dell/csi-baremetal/pkg/drivemgr
- github.com/dell/csi-baremetal/pkg/eventing
- github.com/dell/csi-baremetal/pkg/events
- github.com/dell/csi-baremetal/pkg/metrics
- github.com/dell/csi-baremetal/pkg/metrics/common
- github.com/dell/csi-baremetal/pkg/mocks/linuxutils
- github.com/dell/csi-baremetal/pkg/node
- github.com/dell/csi-baremetal/pkg/node/wbt/common
- github.com/dell/csi-baremetal/pkg/node/wbt/operations
- github.com/dell/csi-baremetal/pkg/scheduler/extender
- github.com/dell/csi-baremetal/pkg/scheduler/extender/healthserver
- github.com/dell/csi-baremetal/pkg/scheduler/extender/healthserver/common
- github.com/fsnotify/fsnotify
- github.com/golang/protobuf/ptypes/wrappers
- github.com/google/uuid
- github.com/grpc-ecosystem/go-grpc-prometheus
- github.com/prometheus/client_golang/prometheus
- github.com/sirupsen/logrus
- github.com/go-logr/logr
- github.com/stretchr/testify/assert
- github.com/stretchr/testify/mock
- github.com/viney-shih/go-lock
- k8s.io/api/apps/v1
- k8s.io/api/core/v1
- k8s.io/api/storage/v1
- k8s.io/apimachinery/pkg/api/errors
- k8s.io/apimachinery/pkg/api/meta
- k8s.io/apimachinery/pkg/api/resource
- k8s.io/apimachinery/pkg/apis/meta/v1
- k8s.io/apimachinery/pkg/runtime
- k8s.io/apimachinery/pkg/types
- k8s.io/client-go/kubernetes
- k8s.io/client-go/plugin/pkg/client/auth/gcp
- k8s.io/client-go/rest
- k8s.io/client-go/tools/record
- k8s.io/client-go/tools/reference
- k8s.io/client-go/util/retry
- k8s.io/client-go/util/workqueue
- k8s.io/kube-scheduler/extender/v1
- k8s.io/utils/keymutex
- sigs.k8s.io/controller-runtime
- sigs.k8s.io/controller-runtime/pkg/cache
- sigs.k8s.io/controller-runtime/pkg/client
- sigs.k8s.io/controller-runtime/pkg/controller
- sigs.k8s.io/controller-runtime/pkg/event
- sigs.k8s.io/controller-runtime/pkg/handler
- sigs.k8s.io/controller-runtime/pkg/manager
- sigs.k8s.io/controller-runtime/pkg/predicate
- sigs.k8s.io/controller-runtime/pkg/source
- sigs.k8s.io/controller-runtime/pkg/config
test:
files:
- "$test"
allow:
- $gostd
linters:
# please, do not use `enable-all`: it is deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- errcheck
- funlen
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- gofmt
- goimports
- golint
- gosimple
- govet
- ineffassign
- lll
- megacheck
- misspell
- nakedret
- scopelint
- staticcheck
- structcheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
- maligned
- prealloc
- dupl
# don't enable:
# - gosec Because CSI uses lsblk servers for now
# - gochecknoglobals Because of NodeAllocatedDisks map
# - godox CSI now has a lot TODOs in source code
# - wsl
# - stylecheck because it is similar to golint and there is conflict between them
run:
deadline: 15m
timeout: 15m
skip-dirs:
- tests/
- vendor/
- api/
skip-files:
- .*_test.go
- .*.pb.go
# golint is disabled by default in golang-ci because of golang community
issues:
exclude-use-default: false