forked from kubernetes-csi/external-snapshot-metadata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
95 lines (92 loc) · 2.16 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
linters:
disable-all: true
enable:
- asciicheck
- copyloopvar
- dogsled
- dupl
- funlen
- gci
- gocognit
- gocritic
- gocyclo
- gofmt
- goprintffuncname
- importas
- lll
- misspell
- nakedret
- nestif
- nolintlint
- staticcheck
- stylecheck
- unparam
- whitespace
run:
timeout: 10m
issues:
exclude-dirs:
- ^client/ # generated code
- ^pkg/api/ # generated code
- ^pkg/csiclientmocks # generated code
- ^pkg/k8sclientmocks # generated code
exclude-files:
- ^release-tools/filter-junit.go
exclude-rules:
- path: _test\.go$
linters:
- dupl
- funlen
- gci
- gocognit
- gocritic
- gocyclo
- lll
- nestif
- unparam
linters-settings:
funlen:
lines: 240
statements: 160
gci:
sections:
- standard
- default
- prefix(github.com/kubernetes-csi/external-snapshot-metadata)
gocognit:
min-complexity: 20
gocyclo:
min-complexity: 20
importas:
no-unaliased: true
alias:
- pkg: github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1
alias: snapshotv1
- pkg: github.com/kubernetes-csi/external-snapshotter/client/v8/clientset/versioned/fake
alias: fakesnapshot
- pkg: github.com/kubernetes-csi/external-snapshotter/v8/pkg/utils
alias: snapshotutils
- pkg: google.golang.org/grpc/health/grpc_health_v1
alias: healthpb
- pkg: k8s.io/api/authentication/v1
alias: authv1
- pkg: k8s.io/api/authorization/v1
alias: authzv1
- pkg: k8s.io/api/core/v1
alias: corev1
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1
alias: apimetav1
- pkg: k8s.io/apimachinery/pkg/runtime
alias: apiruntime
- pkg: k8s.io/client-go/testing
alias: clientgotesting
lll:
line-length: 240
nakedret:
max-func-lines: 2
nestif:
min-complexity: 6
staticcheck:
checks: [ "all", "-ST1000", "-ST1003", "-ST1016" ]
stylecheck:
checks: [ "all", "-ST1001", "-ST1005", "-ST1016", "-ST1023", "-ST1000"]