diff --git a/.golangci.yml b/.golangci.yml index 2a015d5..a61f913 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -4,10 +4,11 @@ run: linters: enable: - bodyclose + - copyloopvar - dogsled - dupl + - err113 - errcheck - - exportloopref - funlen - gochecknoglobals - gochecknoinits @@ -17,10 +18,8 @@ linters: - gocyclo - godot - godox - - goerr113 - gofmt - goimports - - gomnd - goprintffuncname - gosec - gosimple @@ -28,6 +27,7 @@ linters: - ineffassign - lll - misspell + - mnd - nakedret - nestif - noctx diff --git a/fault_test.go b/fault_test.go index 04d681f..7507a9d 100644 --- a/fault_test.go +++ b/fault_test.go @@ -100,7 +100,6 @@ func TestNewFault(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -285,7 +284,6 @@ func TestFaultHandler(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -362,7 +360,6 @@ func TestFaultPercentDo(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(fmt.Sprintf("%g", tt.givePercent), func(t *testing.T) { t.Parallel() diff --git a/injector_chain_test.go b/injector_chain_test.go index b39b668..e664239 100644 --- a/injector_chain_test.go +++ b/injector_chain_test.go @@ -60,7 +60,6 @@ func TestNewChainInjector(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -155,7 +154,6 @@ func TestChainInjectorHandler(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/injector_error_test.go b/injector_error_test.go index 9b476aa..6b35c4b 100644 --- a/injector_error_test.go +++ b/injector_error_test.go @@ -90,7 +90,6 @@ func TestNewErrorInjector(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -132,7 +131,6 @@ func TestErrorInjectorHandler(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/injector_random_test.go b/injector_random_test.go index 08418bb..e736bce 100644 --- a/injector_random_test.go +++ b/injector_random_test.go @@ -91,7 +91,6 @@ func TestNewRandomInjector(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -191,7 +190,6 @@ func TestRandomInjectorHandler(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/injector_reject_test.go b/injector_reject_test.go index 39811ab..66fabd5 100644 --- a/injector_reject_test.go +++ b/injector_reject_test.go @@ -45,7 +45,6 @@ func TestNewRejectInjector(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -72,7 +71,6 @@ func TestRejectInjectorHandler(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/injector_slow_test.go b/injector_slow_test.go index db2146c..12843be 100644 --- a/injector_slow_test.go +++ b/injector_slow_test.go @@ -90,7 +90,6 @@ func TestNewSlowInjector(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -152,7 +151,6 @@ func TestSlowInjectorHandler(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel()