Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for golangci-lint 1.64.2 #110

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .golangci.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ disable = [
# generally
"exhaustruct",

# Not relevant after 1.22
"exportloopref",

# We tried this linter but most places we do forced type asserts are
# pretty safe, e.g., an atomic.Value when everything is encapsulated
# in a small package.
Expand Down Expand Up @@ -95,8 +92,8 @@ disable = [
# actually made it harder to read.
"tagalign",

# We probably _should_ be doing this!
"thelper",
# Deprecated since golangci-lint 1.64.0. The usetesting linter replaces it.
"tenv",

# We don't follow this. Sometimes we test internal code.
"testpackage",
Expand Down
2 changes: 2 additions & 0 deletions mmdbtype/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,8 @@ func TestEqual(t *testing.T) {
}

func validateEncoding(t *testing.T, tests map[string]DataType) {
t.Helper()

for expected, dt := range tests {
w := &dataWriter{Buffer: &bytes.Buffer{}}

Expand Down
4 changes: 3 additions & 1 deletion tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,8 @@ func TestTreeInsertAndGet(t *testing.T) {
}

func checkMMDB(t *testing.T, buf *bytes.Buffer, gets []testGet, name string) {
t.Helper()

t.Run(name, func(t *testing.T) {
reader, err := maxminddb.FromBytes(buf.Bytes())
require.NoError(t, err)
Expand Down Expand Up @@ -836,7 +838,7 @@ func TestGet_4ByteIPIn128BitTree(t *testing.T) {
assert.Equal(t, network.String(), getNetwork.String(), "16-byte lookup")
}

func s2ip(v string) *any { //nolint:gocritic // test
func s2ip(v string) *any {
i := any(v)
return &i
}
Loading