Skip to content

Commit

Permalink
fix: fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mojixcoder committed Aug 28, 2024
1 parent 6222bb9 commit 9325bbd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ linters-settings:
allow-assign-and-anything: true
allow-cuddle-declarations: true
allow-assign-and-call: true
main:
allow:
- "github.com/uber/h3-go/v4"

linters:
disable-all: true
Expand Down
6 changes: 6 additions & 0 deletions h3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,10 @@ func TestPentagons(t *testing.T) {
res := res
t.Run(fmt.Sprintf("res=%d", res), func(t *testing.T) {
t.Parallel()

pentagons := Pentagons(res)
assertEqual(t, 12, len(pentagons))

for _, pentagon := range pentagons {
assertTrue(t, pentagon.IsPentagon())
assertEqual(t, res, pentagon.Resolution())
Expand Down Expand Up @@ -737,6 +739,7 @@ func assertEqual[T comparable](t *testing.T, expected, actual T, msgAndArgs ...i
expStr = fmt.Sprintf("%v", e)
actStr = fmt.Sprintf("%v", a)
}

t.Errorf("%v != %v", expStr, actStr)
logMsgAndArgs(t, msgAndArgs...)
}
Expand Down Expand Up @@ -779,6 +782,7 @@ func assertEqualLatLngs(t *testing.T, expected, actual []LatLng, msgAndArgs ...i

t.Errorf("LatLngs[%d]: (%s, %s)", i, latStr, lngStr)
logMsgAndArgs(t, msgAndArgs...)

count++

if count > 10 {
Expand Down Expand Up @@ -808,6 +812,7 @@ func assertEqualCells(t *testing.T, expected, actual []Cell, msgAndArgs ...inter
if c != actual[i] {
t.Errorf("Cells[%d]: %v != %v", i, c, actual[i])
logMsgAndArgs(t, msgAndArgs...)

count++

if count > 10 {
Expand Down Expand Up @@ -863,6 +868,7 @@ func assertEqualDisks(t *testing.T, expected, actual []Cell) {
for i, cell := range expected {
if cell != actual[i] {
t.Errorf("cell[%d]: %v != %v", i, cell, actual[i])

count++

if count > 5 {
Expand Down

0 comments on commit 9325bbd

Please sign in to comment.