-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.golangci.yml
184 lines (174 loc) · 3.62 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
linters:
disable-all: true
enable:
# default
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- unused
# extra
- asasalint
- asciicheck
- bidichk
- containedctx
- contextcheck
- cyclop
- decorder
- depguard
- dogsled
- dupl
- durationcheck
- errchkjson
- errname
- errorlint
- exhaustive
# - exportloopref # deprecated, use copyloopvar
- copyloopvar
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
# - gomnd # disabled for examples
- err113
- goprintffuncname
- gosec
- grouper
- interfacebloat
- maintidx
- makezero
- mirror
- nakedret
- nestif
- nilerr
- prealloc
- predeclared
- reassign
- revive
- testableexamples
- thelper
- unconvert
- unparam
- usestdlibvars
- wastedassign
- wrapcheck
- gofmt
- zerologlint
linters-settings:
errorlint:
errorf: true
errorf-multi: true
asserts: true
comparison: true
wrapcheck:
ignorePackageGlobs:
- github.com/chainifynet/aws-encryption-sdk-go/pkg/*
cyclop:
max-complexity: 20 # set to 15 for examples
skip-tests: true
nestif:
min-complexity: 8
depguard:
rules:
main:
files:
- "!$test"
allow:
- $gostd
- github.com/chainifynet/aws-encryption-sdk-go
- github.com/aws
- github.com/rs/zerolog
deny:
- pkg: "github.com/pkg/errors"
desc: Should be replaced by standard lib errors package
tests:
files:
- "$test"
allow:
- $gostd
- github.com/chainifynet/aws-encryption-sdk-go
- github.com/aws
- github.com/rs/zerolog
- github.com/stretchr/testify
deny:
- pkg: "github.com/pkg/errors"
desc: Should be replaced by standard lib errors package
mnd:
checks:
- argument
- case
- condition
- operation
- return
- assign
ignored-files:
- 'algorithm\.go'
- 'pkg/utils/conv/conv\.go'
- 'pkg/helpers/arn/validate\.go'
ignored-functions:
- '^math\.'
- '^http\.StatusText$'
- '^strings\.SplitN$'
- 'make'
gocritic:
disabled-checks:
- whyNoLint
- commentFormatting
- commentedOutCode
- captLocal
- unnamedResult
- stringXbytes # disabled for examples
- paramTypeCombine # disabled for examples
enabled-tags:
- diagnostic
- style
- performance
- experimental
- opinionated
settings:
hugeParam:
sizeThreshold: 125
issues:
fix: false
exclude-rules:
- path: 'helper\.go'
linters:
- revive
text: "indent-error-flow:"
- path: '_test\.go'
linters:
- dupl
- exhaustruct
- mirror
- makezero
- gochecknoglobals
- gochecknoinits
- gocritic
- revive
- errorlint
- wrapcheck
- maintidx
- thelper
- unused
- linters:
- gosimple
text: "S1021:"
- path: 'pkg/suite/algorithm.go'
linters:
- revive
text: "var-naming:"
- path: 'pkg/suite/algorithm.go'
linters:
- gochecknoglobals
- path: 'pkg/utils/conv/conv.go'
linters:
- gochecknoglobals
- linters:
- err113
# text: "err113: do not define dynamic errors"
text: "do not define dynamic errors, use wrapped static errors instead"
max-issues-per-linter: 100
max-same-issues: 20