-
Notifications
You must be signed in to change notification settings - Fork 4
/
.golangci.yaml
146 lines (142 loc) · 2.62 KB
/
.golangci.yaml
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
run:
timeout: 10m
tests: true
modules-download-mode: readonly
go: "1.22"
# output configuration options
output:
print-issued-lines: true
print-linter-name: true
uniq-by-line: true
path-prefix: ""
sort-results: true
linters:
disable-all: true
enable:
- asciicheck
- bidichk
- decorder
- durationcheck
- errcheck
- errname
- errorlint
- exportloopref
- godot
- goconst
- gocritic
- gosimple
- gosec
- govet
- gofumpt
- gofmt
- ineffassign
- importas
- lll
- makezero
- misspell
- nakedret
- nilerr
- prealloc
- predeclared
- revive
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- whitespace
linters-settings:
decorder:
dec-order:
- const
- var
- func
disable-init-func-first-check: false
disable-dec-order-check: true
errorlint:
errorf: true
asserts: true
comparison: true
godot:
scope: all
exclude:
- "(?i)^ FIXME:"
- "(?i)^ TODO:"
- "(?i)^ SPDX\\-License\\-Identifier:"
- "(?i)^ +"
period: true
capital: false
goconst:
min-len: 3
min-occurrences: 10
gosimple:
checks: [ "all" ]
gosec:
severity: "low"
confidence: "low"
excludes:
- G101
- G107
- G112
- G404
gofumpt:
extra-rules: true
gofmt:
simplify: true
rewrite-rules:
- pattern: 'interface{}'
replacement: 'any'
- pattern: 'a[b:len(a)]'
replacement: 'a[b:]'
importas:
no-unaliased: true
lll:
line-length: 150
tab-width: 1
makezero:
always: false
misspell:
locale: US
nakedret:
max-func-lines: 60
revive:
rules:
- name: var-naming
disabled: true
arguments:
- [ "HTTP", "ID", "TLS", "TCP", "UDP", "API", "CA", "URL", "DNS" ]
staticcheck:
checks: [ "all", "-SA1019", "-SA2002", "-SA5008" ]
stylecheck:
checks: [ "all", "-ST1003" ]
unparam:
check-exported: false
unused:
field-writes-are-uses: true
post-statements-are-reads: true
exported-is-used: true
exported-fields-are-used: true
parameters-are-used: true
local-variables-are-used: true
generated-is-used: true
usestdlibvars:
http-method: true
http-status-code: true
time-weekday: true
time-month: true
time-layout: true
crypto-hash: true
issues:
exclude-files:
- "doc.go"
- "zz_generated.*.go"
- "gen.*.go"
exclude-rules:
- path: _test\.go
linters:
- errcheck
- gosec
- makezero
- lll