-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.golangci.yml
159 lines (152 loc) · 3.76 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
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2025-04-22T10:59:51Z by kres fd5cab0.
version: "2"
# options for analysis running
run:
modules-download-mode: readonly
issues-exit-code: 1
tests: true
# output configuration options
output:
formats:
text:
path: stdout
print-issued-lines: true
print-linter-name: true
path-prefix: ""
linters:
default: all
disable:
- exhaustruct
- err113
- forbidigo
- funcorder
- funlen
- gochecknoglobals
- gochecknoinits
- godox
- gomoddirectives
- gosec
- inamedparam
- ireturn
- mnd
- nestif
- nonamedreturns
- paralleltest
- tagalign
- tagliatelle
- thelper
- varnamelen
- wrapcheck
- testifylint # complains about our assert recorder and has a number of false positives for assert.Greater(t, thing, 1)
- protogetter # complains about us using Value field on typed spec, instead of GetValue which has a different signature
- perfsprint # complains about us using fmt.Sprintf in non-performance critical code, updating just kres took too long
- musttag # seems to be broken - goes into imported libraries and reports issues there
# all available settings of specific linters
settings:
cyclop:
# the maximal code complexity to report
max-complexity: 20
dogsled:
max-blank-identifiers: 2
dupl:
threshold: 150
errcheck:
check-type-assertions: true
check-blank: true
exhaustive:
default-signifies-exhaustive: false
gocognit:
min-complexity: 30
nestif:
min-complexity: 5
goconst:
min-len: 3
min-occurrences: 3
gocritic:
disabled-checks: [ ]
gocyclo:
min-complexity: 20
godot:
scope: declarations
gomodguard: { }
govet:
enable-all: true
lll:
line-length: 200
tab-width: 4
misspell:
locale: US
nakedret:
max-func-lines: 30
prealloc:
simple: true
range-loops: true # Report preallocation suggestions on range loops, true by default
for-loops: false # Report preallocation suggestions on for loops, false by default
nolintlint:
allow-unused: false
allow-no-explanation: [ ]
require-explanation: false
require-specific: true
rowserrcheck: { }
testpackage: { }
unparam:
check-exported: false
unused:
local-variables-are-used: false
whitespace:
multi-if: false # Enforces newlines (or comments) after every multi-line if statement
multi-func: false # Enforces newlines (or comments) after every multi-line function signature
wsl:
strict-append: true
allow-assign-and-call: true
allow-multiline-assign: true
allow-trailing-comment: false
force-case-trailing-whitespace: 0
allow-separated-leading-comment: false
allow-cuddle-declarations: false
force-err-cuddling: false
depguard:
rules:
prevent_unmaintained_packages:
list-mode: lax # allow unless explicitly denied
files:
- $all
deny:
- pkg: io/ioutil
desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil"
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
issues:
max-issues-per-linter: 10
max-same-issues: 3
uniq-by-line: true
new: false
severity:
default: error
formatters:
enable:
- gci
- gofmt
- gofumpt
settings:
gci:
sections:
- standard
- default
- localmodule
gofmt:
simplify: true
gofumpt:
extra-rules: false
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$