From 6743accd7435ca50c38ec7957ee5fdb27a2776f4 Mon Sep 17 00:00:00 2001 From: Bobby DeSimone Date: Tue, 19 Nov 2019 19:58:11 -0800 Subject: [PATCH] lint: bump golangci-lint 1.21.0 (#391) Signed-off-by: Bobby DeSimone --- .golangci.yml | 14 +++++++++----- Makefile | 2 +- proxy/handlers.go | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 44a8a1cda..dea9f19e8 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,10 +1,10 @@ # forked from istio service: # When updating this, also update bin/linters.sh accordingly - golangci-lint-version: 1.18.x # use the fixed version to not introduce new linters unexpectedly + golangci-lint-version: 1.21.x # use the fixed version to not introduce new linters unexpectedly run: # timeout for analysis, e.g. 30s, 5m, default is 1m - deadline: 5m + deadline: 20m # which dirs to skip: they won't be analyzed; # can use regexp here: generated.*, regexp is applied on full path; @@ -28,16 +28,20 @@ linters: disable: - depguard - dupl + - funlen - gochecknoglobals - gochecknoinits + - gocognit - goconst - gocyclo + - godox + - interfacer + - maligned - nakedret - prealloc - scopelint - - maligned - - interfacer - - funlen + - whitespace + - wsl fast: false linters-settings: diff --git a/Makefile b/Makefile index b6ea86756..59daf9e4e 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ CTIMEVAR=-X $(PKG)/internal/version.GitCommit=$(GITCOMMIT) \ -X $(PKG)/internal/version.ProjectURL=$(PKG) GO_LDFLAGS=-ldflags "-s -w $(CTIMEVAR)" GOOSARCHES = linux/amd64 darwin/amd64 windows/amd64 -GOLANGCI_VERSION = v1.18.0 # .... for some reason v1.18.0 misses? +GOLANGCI_VERSION = v1.21.0 # .... for some reason v1.18.0 misses? .PHONY: all all: clean build-deps test lint spellcheck build ## Runs a clean, build, fmt, lint, test, and vet. diff --git a/proxy/handlers.go b/proxy/handlers.go index 1fa296a5d..2cbe86da7 100644 --- a/proxy/handlers.go +++ b/proxy/handlers.go @@ -151,7 +151,7 @@ func (p *Proxy) Verify(verifyOnly bool) http.Handler { w.Header().Set("Content-Type", "text/plain; charset=utf-8") w.Header().Set("X-Content-Type-Options", "nosniff") w.WriteHeader(http.StatusOK) - fmt.Fprintf(w, fmt.Sprintf("Access to %s is allowed.", uri.Host)) + fmt.Fprintf(w, "Access to %s is allowed.", uri.Host) }) }