Skip to content

Commit 9b0a333

Browse files
committed
Update golangci-lint config
1 parent 0318c64 commit 9b0a333

File tree

1 file changed

+1
-44
lines changed

1 file changed

+1
-44
lines changed

.golangci.toml

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"bodyclose",
1212
"containedctx",
1313
"contextcheck",
14-
"deadcode",
1514
"depguard",
1615
"durationcheck",
1716
"errcheck",
@@ -43,51 +42,19 @@
4342
"nosprintfhostport",
4443
"predeclared",
4544
"revive",
46-
"rowserrcheck",
4745
"sqlclosecheck",
4846
"staticcheck",
49-
"structcheck",
5047
"stylecheck",
5148
"tenv",
5249
"tparallel",
5350
"typecheck",
5451
"unconvert",
5552
"unparam",
5653
"unused",
57-
"varcheck",
5854
"vetshadow",
59-
"wastedassign",
60-
]
61-
62-
# Please note that we only use depguard for stdlib as gomodguard only
63-
# supports modules currently. See https://github.com/ryancurrah/gomodguard/issues/12
64-
[linters-settings.depguard]
65-
list-type = "blacklist"
66-
include-go-root = true
67-
packages = [
68-
# ioutil is deprecated. The functions have been moved elsewhere:
69-
# https://golang.org/doc/go1.16#ioutil
70-
"io/ioutil",
7155
]
7256

7357
[linters-settings.errcheck]
74-
# Don't allow setting of error to the blank identifier. If there is a legtimate
75-
# reason, there should be a nolint with an explanation.
76-
check-blank = true
77-
78-
exclude-functions = [
79-
# If we are rolling back a transaction, we are often already in an error
80-
# state.
81-
'(*database/sql.Tx).Rollback',
82-
83-
# It is reasonable to ignore errors if Cleanup fails in most cases.
84-
'(*github.com/google/renameio/v2.PendingFile).Cleanup',
85-
86-
# We often don't care if removing a file failed (e.g., it doesn't exist)
87-
'os.Remove',
88-
'os.RemoveAll',
89-
]
90-
9158
# Ignoring Close so that we don't have to have a bunch of
9259
# `defer func() { _ = r.Close() }()` constructs when we
9360
# don't actually care about the error.
@@ -101,13 +68,6 @@
10168
[linters-settings.exhaustive]
10269
default-signifies-exhaustive = true
10370

104-
[linters-settings.forbidigo]
105-
# Forbid the following identifiers
106-
forbid = [
107-
"^minFraud*",
108-
"^maxMind*",
109-
]
110-
11171
[linters-settings.gocritic]
11272
enabled-checks = [
11373
"appendAssign",
@@ -227,7 +187,7 @@
227187

228188
[linters-settings.gofumpt]
229189
extra-rules = true
230-
lang-version = "1.18"
190+
lang-version = "1.19"
231191

232192
[linters-settings.govet]
233193
"enable-all" = true
@@ -293,9 +253,6 @@
293253
# [[linters-settings.revive.rules]]
294254
# name = "cyclomatic"
295255

296-
# [[linters-settings.revive.rules]]
297-
# name = "deep-exit"
298-
299256
[[linters-settings.revive.rules]]
300257
name = "defer"
301258

0 commit comments

Comments
 (0)