From dbba2fabae59125d1d89462734497677e2720ab3 Mon Sep 17 00:00:00 2001 From: Dimitri Herzog Date: Mon, 19 Aug 2024 21:54:27 +0200 Subject: [PATCH] chore(build): update golangci-lint --- .golangci.yml | 5 ----- Makefile | 2 +- lists/list_cache_test.go | 3 ++- util/http.go | 4 ++-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 235aeb0ee..8d49c3fd8 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -53,16 +53,11 @@ linters: - usestdlibvars - wastedassign - whitespace - - wsl - ginkgolinter - noctx - containedctx - contextcheck disable: - - scopelint - - structcheck - - deadcode - - varcheck - forbidigo - gosmopolitan disable-all: false diff --git a/Makefile b/Makefile index 0a381e866..4c286b3d1 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ GO_BUILD_LD_FLAGS:=\ GO_BUILD_OUTPUT:=$(BIN_OUT_DIR)/$(BINARY_NAME)$(BINARY_SUFFIX) # define version of golangci-lint here. If defined in tools.go, go mod perfoms automatically downgrade to older version which doesn't work with golang >=1.18 -GOLANG_LINT_VERSION=v1.58.2 +GOLANG_LINT_VERSION=v1.60.1 GINKGO_PROCS?=-p diff --git a/lists/list_cache_test.go b/lists/list_cache_test.go index b937b15e9..feab22034 100644 --- a/lists/list_cache_test.go +++ b/lists/list_cache_test.go @@ -473,7 +473,8 @@ func createTestListFile(dir string, totalLines int) (string, int) { for i := 0; i < totalLines; i++ { fmt.Fprintln(w, uuid.NewString()+".com") } - w.Flush() + + Expect(w.Flush()).Should(Succeed()) return file.Name(), totalLines } diff --git a/util/http.go b/util/http.go index 989e271e0..11c7339af 100644 --- a/util/http.go +++ b/util/http.go @@ -25,9 +25,9 @@ func init() { // DefaultHTTPTransport returns a new Transport with the same defaults as net/http. func DefaultHTTPTransport() *http.Transport { return &http.Transport{ - Dial: baseTransport.Dial, //nolint:staticcheck + Dial: baseTransport.Dial, DialContext: baseTransport.DialContext, - DialTLS: baseTransport.DialTLS, //nolint:staticcheck + DialTLS: baseTransport.DialTLS, DialTLSContext: baseTransport.DialTLSContext, DisableCompression: baseTransport.DisableCompression, DisableKeepAlives: baseTransport.DisableKeepAlives,