Skip to content

Commit

Permalink
Move dotimports testing lint to golangci
Browse files Browse the repository at this point in the history
  • Loading branch information
emcfarlane committed Feb 29, 2024
1 parent 095e4e2 commit 892d30e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ issues:
- path: (.+)_test\.go
linters:
- forcetypeassert
# Allow dot imports for testing.
- path: (.+)_test\.go
text: "^dot-imports: should not use dot imports"
linters:
- revive
# Allow clocktest within tests
- path: (.+)_test\.go
text: "^use of `clocktest\\."
Expand Down
2 changes: 1 addition & 1 deletion resolver/min_conns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"context"
"testing"

. "github.com/bufbuild/httplb/resolver" //nolint:revive // use dot import for tests
. "github.com/bufbuild/httplb/resolver"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion resolver/rendezvous_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"io"
"testing"

. "github.com/bufbuild/httplb/resolver" //nolint:revive // use dot import for tests
. "github.com/bufbuild/httplb/resolver"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down

0 comments on commit 892d30e

Please sign in to comment.