Skip to content

Commit

Permalink
Update golangci-lint config
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Jun 3, 2024
1 parent 20ec628 commit f99469d
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions .golangci.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,6 @@ disable = [
# This would probably be good, but we would need to configure it.
"wsl",

# These are all deprecated
"deadcode",
"exhaustivestruct",
"golint",
"ifshort",
"interfacer",
"maligned",
"nosnakecase",
"scopelint",
"structcheck",
"varcheck",

# Require Go 1.22
"copyloopvar",
"intrange",
Expand Down Expand Up @@ -167,11 +155,6 @@ exclude-functions = [
'os.RemoveAll',
]

# Ignoring Close so that we don't have to have a bunch of
# `defer func() { _ = r.Close() }()` constructs when we
# don't actually care about the error.
ignore = "Close,fmt:.*"

[linters-settings.errorlint]
errorf = true
asserts = true
Expand Down Expand Up @@ -619,6 +602,16 @@ linters = [
]
path = "_test.go"

[[issues.exclude-rules]]
linters = [
"errcheck",
]
# There are many cases where we want to just close resources and ignore the
# error (e.g., for defer f.Close on a read). errcheck removed its built-in
# wildcard ignore. I tried listing all of the cases, but it was too many
# and some were very specific.
source = "\\.Close"

[[issues.exclude-rules]]
linters = [
"stylecheck",
Expand Down

0 comments on commit f99469d

Please sign in to comment.