-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
77 lines (74 loc) · 1.76 KB
/
.golangci.yaml
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
run:
concurrency: 4
timeout: 10m
linters:
enable:
- exportloopref
- ginkgolinter
- gocritic
- gosec
- importas
- misspell
- nilerr
- nolintlint
- prealloc
- revive
- stylecheck
- unconvert
- unparam
- whitespace
linters-settings:
importas:
alias:
- pkg: k8s.io/api/(\w+)/(v[\w\d]+)
alias: $1$2
- pkg: k8s.io/apimachinery/pkg/apis/(\w+)/(v[\w\d]+)
alias: $1$2
- pkg: k8s.io/apimachinery/pkg/api/([^m]\w+)
alias: api${1}
- pkg: k8s.io/apimachinery/pkg/util/(\w+)
alias: util${1}
- pkg: k8s.io/client-go/tools/clientcmd/api/(\w+)
alias: clientcmd${1}
- pkg: k8s.io/client-go/tools/cache
alias: toolscache
- pkg: k8s.io/component-base/config/(v[\w\d]+)
alias: componentbaseconfig$1
- pkg: k8s.io/utils/clock/testing
alias: testclock
- pkg: sigs.k8s.io/controller-runtime/pkg/client/fake
alias: fakeclient
- pkg: sigs.k8s.io/controller-runtime/pkg/log/zap
alias: logzap
- pkg: sigs.k8s.io/controller-runtime/pkg/log
alias: logf
misspell:
locale: US
nolintlint:
require-specific: true
revive:
rules:
- name: context-as-argument
- name: duplicated-imports
- name: early-return
- name: unreachable-code
issues:
exclude-use-default: false
exclude:
# revive:
- "should have a package comment"
- dot-imports # should not use dot imports
exclude-rules:
- linters:
- staticcheck
text: "SA1019:" # Excludes messages where deprecated variables are used
- linters:
- stylecheck
text: "ST1003:.+func SetDefaults_"
- linters:
- stylecheck
text: "ST1001: should not use dot imports"
path: "(.+_test.go|^test/)"
- linters:
- nolintlint
text: "should be written without leading space"