Skip to content

Commit

Permalink
Merge pull request #110 from maxmind/horgh/golangci-lint
Browse files Browse the repository at this point in the history
Update for golangci-lint 1.64.2
  • Loading branch information
NajiObeid authored Feb 12, 2025
2 parents 48e1d1f + 667ed88 commit 7d670e4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
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
}

0 comments on commit 7d670e4

Please sign in to comment.