-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
125 lines (123 loc) · 2.79 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
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
run:
deadline: 5m
skip-files: []
skip-dirs: []
linters-settings:
govet:
enable-all: true
disable:
- fieldalignment
gocyclo:
min-complexity: 15
goconst:
min-len: 5
min-occurrences: 3
misspell:
locale: US
funlen:
lines: -1
statements: 50
godox:
keywords:
- FIXME
gofumpt:
extra-rules: true
depguard:
list-type: blacklist
include-go-root: false
packages:
- github.com/sirupsen/logrus
- github.com/pkg/errors
gocritic:
enabled-tags:
- diagnostic
- style
- performance
disabled-checks:
- sloppyReassign
- rangeValCopy
- octalLiteral
- paramTypeCombine # already handled by gofumpt.extra-rules
- commentedOutCode # FIXME
- builtinShadow # FIXME
- importShadow # FIXME
settings:
hugeParam:
sizeThreshold: 500
gomoddirectives:
replace-allow-list:
- k8s.io/api
- k8s.io/apiextensions-apiserver
- k8s.io/apimachinery
- k8s.io/apiserver
- k8s.io/cli-runtime
- k8s.io/client-go
- k8s.io/cloud-provider
- k8s.io/cluster-bootstrap
- k8s.io/code-generator
- k8s.io/component-base
- k8s.io/component-helpers
- k8s.io/controller-manager
- k8s.io/cri-api
- k8s.io/csi-translation-lib
- k8s.io/kube-aggregator
- k8s.io/kube-controller-manager
- k8s.io/kube-proxy
- k8s.io/kube-scheduler
- k8s.io/kubectl
- k8s.io/kubelet
- k8s.io/legacy-cloud-providers
- k8s.io/metrics
- k8s.io/mount-utils
- k8s.io/pod-security-admission
- k8s.io/sample-apiserver
- k8s.io/sample-cli-plugin
- k8s.io/sample-controller
linters:
enable-all: true
disable:
- maligned # deprecated
- interfacer # deprecated
- scopelint # deprecated
- golint # deprecated
- sqlclosecheck # not relevant (SQL)
- rowserrcheck # not relevant (SQL)
- cyclop # duplicate of gocyclo
- lll
- dupl
- wsl
- nlreturn
- gomnd
- goerr113
- wrapcheck
- exhaustive
- exhaustivestruct
- testpackage
- tparallel
- paralleltest
- prealloc
- ifshort
- forcetypeassert
- bodyclose # Too many false positives: https://github.com/timakin/bodyclose/issues/30
- varnamelen
- nilnil
# FIXME
- ireturn
- goprintffuncname
- gochecknoglobals
- revive
- gochecknoinits
- gci
- godox
- predeclared
issues:
exclude-use-default: false
max-per-linter: 0
max-same-issues: 0
exclude:
- "ST1000: at least one file in a package should have a package comment"
- "G204: Subprocess launched with variable"
- "G304: Potential file inclusion via variable"
exclude-rules:
- path: ".+_test.go"
linters: ["gocyclo", "gocognit"]