-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.golangci.yml
More file actions
197 lines (197 loc) · 3.67 KB
/
.golangci.yml
File metadata and controls
197 lines (197 loc) · 3.67 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
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
185
186
187
188
189
190
191
192
193
194
195
196
197
version: "2"
run:
issues-exit-code: 0
tests: true
output:
formats:
text:
path: stderr
print-linter-name: true
print-issued-lines: true
checkstyle:
path: linters-report.xml
sort-order:
- linter
- severity
- file
path-prefix: ""
linters:
default: none
enable:
- bodyclose
- copyloopvar
- depguard
- dogsled
- dupl
- errcheck
- funlen
- gochecknoinits
- goconst
- gocritic
- gocyclo
- goprintffuncname
- gosec
- govet
- ineffassign
- lll
- misspell
- mnd
- nakedret
- noctx
- nolintlint
- revive
- rowserrcheck
- staticcheck
- unconvert
- unparam
- unused
- whitespace
- wsl_v5
settings:
depguard:
rules:
logger:
deny:
- pkg: github.com/sirupsen/logrus
desc: logging is allowed only by github.com/obalunenko/logger
dupl:
threshold: 100
funlen:
lines: 100
statements: 50
goconst:
min-len: 2
min-occurrences: 2
gocritic:
disabled-checks:
- dupImport
- ifElseChain
- hugeParam
- octalLiteral
- wrapperFunc
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
gocyclo:
min-complexity: 15
govet:
enable:
- appends
- asmdecl
- assign
- atomic
- atomicalign
- bools
- buildtag
- cgocall
- composites
- copylocks
- deepequalerrors
- defers
- directive
- errorsas
- findcall
- framepointer
- httpresponse
- ifaceassert
- loopclosure
- lostcancel
- nilfunc
- nilness
- printf
- reflectvaluecompare
- shadow
- shift
- sigchanyzer
- slog
- sortslice
- stdmethods
- stringintconv
- structtag
- testinggoroutine
- tests
- timeformat
- unmarshal
- unreachable
- unsafeptr
- unusedresult
- unusedwrite
disable:
- fieldalignment
disable-all: false
lll:
line-length: 140
misspell:
locale: US
mnd:
checks:
- argument
- case
- condition
- operation
- return
- assign
nolintlint:
require-explanation: false
require-specific: false
allow-unused: false
wsl_v5:
allow-first-in-block: true
allow-whole-block: false
branch-max-lines: 2
exclusions:
generated: lax
rules:
- linters:
- dupl
- funlen
- gocyclo
- gosec
path: _test\.go
- path: (.+)\.go$
text: exported func * returns unexported type *, which can be annoying to use
- path: (.+)\.go$
text: should have a package comment, unless it's in another file for this package
paths:
- \.pb\.go$
- vendor/
- third_party$
- builtin$
- examples$
issues:
uniq-by-line: true
new: false
fix: false
severity:
default: error
rules:
- linters:
- dupl
severity: info
formatters:
enable:
- gofmt
- goimports
settings:
gci:
sections:
- standard
- default
- prefix(github.com/obalunenko)
- localmodule
custom-order: true
no-lex-order: true
goimports:
local-prefixes:
- github.com/obalunenko/getenv
exclusions:
generated: lax
paths:
- \.pb\.go$
- vendor/
- third_party$
- builtin$
- examples$