mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-03 12:26:03 +02:00
Merge pull request #302 from desimone/bugs/staple-golangci-version
deployment: staple linter versions
This commit is contained in:
commit
014d1e6e2b
2 changed files with 12 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
# forked from istio
|
# forked from istio
|
||||||
service:
|
service:
|
||||||
# When updating this, also update bin/linters.sh accordingly
|
# When updating this, also update bin/linters.sh accordingly
|
||||||
golangci-lint-version: 1.17.x # use the fixed version to not introduce new linters unexpectedly
|
golangci-lint-version: 1.18.x # use the fixed version to not introduce new linters unexpectedly
|
||||||
run:
|
run:
|
||||||
# timeout for analysis, e.g. 30s, 5m, default is 1m
|
# timeout for analysis, e.g. 30s, 5m, default is 1m
|
||||||
deadline: 5m
|
deadline: 5m
|
||||||
|
@ -37,6 +37,7 @@ linters:
|
||||||
- scopelint
|
- scopelint
|
||||||
- maligned
|
- maligned
|
||||||
- interfacer
|
- interfacer
|
||||||
|
- funlen
|
||||||
fast: false
|
fast: false
|
||||||
|
|
||||||
linters-settings:
|
linters-settings:
|
||||||
|
|
13
Makefile
13
Makefile
|
@ -27,10 +27,17 @@ CTIMEVAR=-X $(PKG)/internal/version.GitCommit=$(GITCOMMIT) \
|
||||||
-X $(PKG)/internal/version.ProjectURL=$(PKG)
|
-X $(PKG)/internal/version.ProjectURL=$(PKG)
|
||||||
GO_LDFLAGS=-ldflags "-s -w $(CTIMEVAR)"
|
GO_LDFLAGS=-ldflags "-s -w $(CTIMEVAR)"
|
||||||
GOOSARCHES = linux/amd64 darwin/amd64 windows/amd64
|
GOOSARCHES = linux/amd64 darwin/amd64 windows/amd64
|
||||||
|
GOLANGCI_VERSION = v1.18.0 # .... for some reason v1.18.0 misses?
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: clean lint spellcheck test build ## Runs a clean, build, fmt, lint, test, and vet.
|
all: clean build-deps test lint spellcheck build ## Runs a clean, build, fmt, lint, test, and vet.
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: build-deps
|
||||||
|
build-deps: ## Install build dependencies
|
||||||
|
@echo "==> $@"
|
||||||
|
@cd /tmp; GO111MODULE=on go get -u github.com/client9/misspell/cmd/misspell
|
||||||
|
@cd /tmp; GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_VERSION}
|
||||||
|
|
||||||
.PHONY: docs
|
.PHONY: docs
|
||||||
docs: ## Start the vuepress docs development server
|
docs: ## Start the vuepress docs development server
|
||||||
|
@ -50,7 +57,6 @@ build: ## Builds dynamic executables and/or packages.
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint: ## Verifies `golint` passes.
|
lint: ## Verifies `golint` passes.
|
||||||
@echo "==> $@"
|
@echo "==> $@"
|
||||||
@GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
|
|
||||||
@golangci-lint run ./...
|
@golangci-lint run ./...
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
|
@ -61,7 +67,6 @@ test: ## Runs the go tests.
|
||||||
.PHONY: spellcheck
|
.PHONY: spellcheck
|
||||||
spellcheck: # Spellcheck docs
|
spellcheck: # Spellcheck docs
|
||||||
@echo "==> Spell checking docs..."
|
@echo "==> Spell checking docs..."
|
||||||
@GO111MODULE=off go get -u github.com/client9/misspell/cmd/misspell
|
|
||||||
@misspell -error -source=text docs/
|
@misspell -error -source=text docs/
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue