Skip to content

Commit

Permalink
Merge pull request #33 from maxmind/greg/update-golangci-lint
Browse files Browse the repository at this point in the history
Update golangci-lint config
  • Loading branch information
faktas2 authored Jun 3, 2024
2 parents bb32d4d + 42a0ea9 commit bafbe8a
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 bafbe8a

Please sign in to comment.