Skip to content

Commit 6b8f50b

Browse files
authored
chore: clean up golangci-lint config (#7638)
Signed-off-by: Matthieu MOREL <[email protected]>
1 parent 5a4eba6 commit 6b8f50b

File tree

1 file changed

+6
-94
lines changed

1 file changed

+6
-94
lines changed

.golangci.yml

Lines changed: 6 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -71,151 +71,71 @@ linters:
7171
# This means that linting errors with less than 0.8 confidence will be ignored.
7272
# Default: 0.8
7373
confidence: 0.01
74+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
7475
rules:
75-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#blank-imports
7676
- name: blank-imports
77-
disabled: false
78-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr
7977
- name: bool-literal-in-expr
80-
disabled: false
81-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr
8278
- name: constant-logical-expr
83-
disabled: false
84-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument
8579
# TODO (#2877) re-enable linter when it is compatible. https://github.com/golangci/golangci-lint/issues/3280
8680
- name: context-as-argument
8781
disabled: true
8882
arguments:
8983
allowTypesBefore: "*testing.T"
90-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type
9184
- name: context-keys-type
92-
disabled: false
93-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#deep-exit
9485
- name: deep-exit
95-
disabled: false
96-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#defer
9786
- name: defer
98-
disabled: false
9987
arguments:
10088
- ["call-chain", "loop"]
101-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#dot-imports
10289
- name: dot-imports
103-
disabled: false
104-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#duplicated-imports
10590
- name: duplicated-imports
106-
disabled: false
107-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return
10891
- name: early-return
109-
disabled: false
110-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block
11192
- name: empty-block
112-
disabled: false
113-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines
11493
- name: empty-lines
115-
disabled: false
116-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming
11794
- name: error-naming
118-
disabled: false
119-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-return
12095
- name: error-return
121-
disabled: false
122-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-strings
12396
- name: error-strings
124-
disabled: false
125-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#errorf
12697
- name: errorf
127-
disabled: false
128-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported
12998
- name: exported
130-
disabled: false
13199
arguments:
132100
- "sayRepetitiveInsteadOfStutters"
133-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#flag-parameter
134101
- name: flag-parameter
135-
disabled: false
136-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#identical-branches
137102
- name: identical-branches
138-
disabled: false
139-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return
140103
- name: if-return
141-
disabled: false
142-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#increment-decrement
143104
- name: increment-decrement
144-
disabled: false
145-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#indent-error-flow
146105
- name: indent-error-flow
147-
disabled: false
148-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#import-shadowing
149106
- name: import-shadowing
150-
disabled: false
151-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments
152107
- name: package-comments
153-
disabled: false
154-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range
155108
- name: range
156-
disabled: false
157-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-in-closure
158109
- name: range-val-in-closure
159-
disabled: false
160-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-address
161110
- name: range-val-address
162-
disabled: false
163-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redefines-builtin-id
164111
- name: redefines-builtin-id
165-
disabled: false
166-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-format
167112
- name: string-format
168-
disabled: false
169113
arguments:
170114
- - panic
171115
- '/^[^\n]*$/'
172116
- must not contain line breaks
173-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag
174117
- name: struct-tag
175-
disabled: false
176-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#superfluous-else
177118
- name: superfluous-else
178-
disabled: false
179-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal
180119
- name: time-equal
181-
disabled: false
182-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-naming
183-
- name: var-naming
184-
disabled: false
185-
arguments:
186-
- ["ID"] # AllowList
187-
- ["Otel", "Aws", "Gcp"] # DenyList
188-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration
189-
- name: var-declaration
190-
disabled: false
191-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unconditional-recursion
192120
- name: unconditional-recursion
193-
disabled: false
194-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return
195121
- name: unexported-return
196-
disabled: false
197-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error
198122
- name: unhandled-error
199-
disabled: false
200123
arguments:
201124
- "fmt.Fprint"
202125
- "fmt.Fprintf"
203126
- "fmt.Fprintln"
204127
- "fmt.Print"
205128
- "fmt.Printf"
206129
- "fmt.Println"
207-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt
208130
- name: unnecessary-stmt
209-
disabled: false
210-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#use-any
211131
- name: use-any
212-
disabled: false
213-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break
214132
- name: useless-break
215-
disabled: false
216-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value
133+
- name: var-declaration
134+
- name: var-naming
135+
arguments:
136+
- ["ID"] # AllowList
137+
- ["Otel", "Aws", "Gcp"] # DenyList
217138
- name: waitgroup-by-value
218-
disabled: false
219139
testifylint:
220140
enable-all: true
221141
disable:
@@ -257,10 +177,6 @@ linters:
257177
- gosec
258178
path: config/*.go
259179
text: 'G402: TLS MinVersion too low.'
260-
paths:
261-
- third_party$
262-
- builtin$
263-
- examples$
264180
issues:
265181
max-issues-per-linter: 0
266182
max-same-issues: 0
@@ -274,7 +190,3 @@ formatters:
274190
- go.opentelemetry.io
275191
exclusions:
276192
generated: lax
277-
paths:
278-
- third_party$
279-
- builtin$
280-
- examples$

0 commit comments

Comments
 (0)