chore(lint): ignore dupl linter for test files

This commit is contained in:
Quentin McGaw
2022-08-28 19:14:19 +00:00
parent d725c7c856
commit 45c684232d
3 changed files with 8 additions and 5 deletions

View File

@@ -14,6 +14,9 @@ issues:
text: "mnd: Magic number: 2, in <argument> detected"
linters:
- gomnd
- path: _test\.go
linters:
- dupl
linters:
enable:

View File

@@ -17,7 +17,7 @@ import (
func uint32Ptr(n uint32) *uint32 { return &n }
func Test_fetcher_IP(t *testing.T) { //nolint:dupl
func Test_fetcher_IP(t *testing.T) {
t.Parallel()
ctx := context.Background()
@@ -61,7 +61,7 @@ func Test_fetcher_IP(t *testing.T) { //nolint:dupl
assert.Equal(t, expectedFetcher, initialFetcher)
}
func Test_fetcher_IP4(t *testing.T) { //nolint:dupl
func Test_fetcher_IP4(t *testing.T) {
t.Parallel()
ctx := context.Background()

View File

@@ -20,7 +20,7 @@ func Test_newDefaultSettings(t *testing.T) {
assert.GreaterOrEqual(t, int(settings.timeout), int(time.Millisecond))
}
func Test_SetProvidersIP(t *testing.T) { //nolint:dupl
func Test_SetProvidersIP(t *testing.T) {
t.Parallel()
testCases := map[string]struct {
@@ -72,7 +72,7 @@ func Test_SetProvidersIP(t *testing.T) { //nolint:dupl
}
}
func Test_SetProvidersIP4(t *testing.T) { //nolint:dupl
func Test_SetProvidersIP4(t *testing.T) {
t.Parallel()
testCases := map[string]struct {
@@ -124,7 +124,7 @@ func Test_SetProvidersIP4(t *testing.T) { //nolint:dupl
}
}
func Test_SetProvidersIP6(t *testing.T) { //nolint:dupl
func Test_SetProvidersIP6(t *testing.T) {
t.Parallel()
testCases := map[string]struct {