lint: bump golangci-lint 1.21.0 (#391)

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
Bobby DeSimone 2019-11-19 19:58:11 -08:00 committed by GitHub
parent ec9607d1d5
commit 6743accd74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 7 deletions

View file

@ -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:

View file

@ -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.

View file

@ -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)
})
}