-
Notifications
You must be signed in to change notification settings - Fork 34
/
.golangci.yml
122 lines (119 loc) · 4.28 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
run:
timeout: 5m
tests: false
linters-settings:
errcheck:
check-blank: true
gocognit:
min-complexity: 50
gocyclo:
min-complexity: 50
gocritic:
enabled-tags:
- diagnostic
- performance
- style
disabled-checks:
- commentedOutCode
- evalOrder
- hugeParam
- importShadow
- regexpSimplify
- yodaStyleExpr
- whyNoLint
lll:
line-length: 180
nestif:
min-complexity: 6
linters:
enable-all: true
disable:
- depguard
- tagalign
- interfacebloat
- gci
- contextcheck
- cyclop
- durationcheck
- exhaustive
- exhaustruct
- forbidigo
- forcetypeassert
- funlen
- gosec
- gochecknoglobals
- gochecknoinits
- err113
- gomnd
- ireturn
- nilerr
- nlreturn
- nolintlint
- nonamedreturns
- prealloc
- promlinter
- tagliatelle
- varnamelen
- wrapcheck
- wsl
- exportloopref
- execinquery
- mnd
issues:
exclude-files:
- _gen\.go$
- _string\.go$
- mock_.*\.go$
- pkg/managerclient/sizesuffix.go
exclude-use-default: false
exclude:
- a blank import should be only in a main or test package, or have a comment justifying it
- package-comments[:] should have a package comment
- at least one file in a package should have a package comment
- cognitive complexity [\d]+ of func `\(\*Service\)\.Backup` is high
- cognitive complexity [\d]+ of func `\(\*Service\)\.Repair` is high
- composite literal uses unkeyed fields
- exported function Default.+ should have comment or be unexported
- exported function New.* should have comment or be unexported
- exported function Make
- exported method +\.Close should have comment or be unexported
- exported method .*Value\..+ should have comment or be unexported
- exported method .+\.Init should have comment or be unexported
- exported method .+\.IsZero should have comment or be unexported
- exported method .+\.Key should have comment or be unexported
- exported method .+\.MarshalBinary should have comment or be unexported
- exported method .+\.MarshalCQL should have comment or be unexported
- exported method .+\.MarshalJson should have comment or be unexported
- exported method .+\.MarshalText should have comment or be unexported
- exported method .+\.MarshalUDT should have comment or be unexported
- exported method .+\.UnmarshalBinary should have comment or be unexported
- exported method .+\.UnmarshalCQL should have comment or be unexported
- exported method .+\.UnmarshalJson should have comment or be unexported
- exported method .+\.UnmarshalText should have comment or be unexported
- exported method .+\.UnmarshalUDT should have comment or be unexported
- exported method .+\.Validate should have comment or be unexported
- exported method .+\.Value should have comment or be unexported
- exported method .+\.WriteTo should have comment or be unexported
- exported method Service.Runner should have comment or be unexported
- exported method Wrapper\..+ should have comment or be unexported
- exported method Runner\.Run should have comment or be unexported
- exported type .*Metrics should have comment or be unexported
- exported type .*Value should have comment or be unexported
- exported type Option should have comment or be unexported
- exported type Service should have comment or be unexported
- exported var Default.+ should have comment or be unexported
- has json tag but is not exported
- naked return in func `WriteTo`
- replacement are not allowed
- return value of `.+\.Close` is not checked
- return value of `net.SplitHostPort` is not checked
- return value of `strconv.ParseBool` is not checked
- should merge variable declaration with assignment on next line
- should not use dot imports
- string `string` has [\d]+ occurrences, make it a constant
- Function name[:] .+, Cyclomatic Complexity
exclude-rules:
- path: v3/pkg/managerclient|pkg/command|pkg/cmd
text: Error return value of `fmt.Fprintf?(ln)?` is not checked
- path: pkg/scheduler/activation\.go
text: receiver-naming[:] receiver name .+ should be consistent with previous receiver name .+ for invalid-type