-
Notifications
You must be signed in to change notification settings - Fork 210
Expand file tree
/
Copy path.golangci.yaml
More file actions
78 lines (76 loc) · 2 KB
/
Copy path.golangci.yaml
File metadata and controls
78 lines (76 loc) · 2 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
version: "2"
run:
timeout: 5m
linters:
default: none
enable:
- decorder
- errcheck
- govet
- grouper
- importas
- ineffassign
- modernize
- revive
- staticcheck
- thelper
- unconvert
- unused
- usestdlibvars
- whitespace
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
settings:
importas:
no-unaliased: true
alias:
- pkg: sigs.k8s.io/controller-runtime/pkg/client
alias: kclient
- pkg: k8s.io/apimachinery/pkg/api/errors
alias: apierrors
decorder:
dec-order:
- const
- var
- type
- func
# If true, order of declarations is not checked at all.
disable-dec-order-check: false
# If true, `init` func can be anywhere in file (does not have to be declared before all other functions).
disable-init-func-first-check: false
# If true, multiple global `type`, `const` and `var` declarations are allowed.
disable-dec-num-check: false
# If true, type declarations will be ignored for dec num check.
disable-type-dec-num-check: true
grouper:
# Require the use of a single global 'const' declaration only.
const-require-single-const: true
# Require the use of grouped global 'const' declarations.
const-require-grouping: true
# Require the use of a single 'import' declaration only.
import-require-single-import: true
# Require the use of grouped 'import' declarations.
import-require-grouping: true
# Require the use of a single global 'var' declaration only.
var-require-single-var: true
# Require the use of grouped global 'var' declarations.
var-require-grouping: true
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$