Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2020-05-28 03:47:15 +0300
committerJaime Martinez <jmartinez@gitlab.com>2020-05-28 04:11:36 +0300
commitd92f6f44ac5910215a5286839c534760df8d071b (patch)
treeea4e8381fcbb6c29d088ee52254c0a92732a2c0d /Makefile.util.mk
parentf98b87053275008e9921099872af9c1bcd16e219 (diff)
Add REPORT_FILE to makefile
Diffstat (limited to 'Makefile.util.mk')
-rw-r--r--Makefile.util.mk6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile.util.mk b/Makefile.util.mk
index 3f483647..93689d5f 100644
--- a/Makefile.util.mk
+++ b/Makefile.util.mk
@@ -1,17 +1,17 @@
-# Dockerfile https://gitlab.com/gitlab-org/gitlab-build-images/-/blob/master/Dockerfile.golangci-lint-alpine
GOLANGCI_LINT_IMAGE := golangci/golangci-lint:$(GOLANGCI_LINT_VERSION)
.PHONY: lint lint-docker test race acceptance bench cover list deps-check deps-download
OUT_FORMAT ?= colored-line-number
LINT_FLAGS ?= $(if $V,-v)
+REPORT_FILE ?=
lint: .GOPATH/.ok bin/golangci-lint
- $Q ./bin/golangci-lint run ./... --out-format $(OUT_FORMAT) $(LINT_FLAGS)
+ $Q ./bin/golangci-lint run ./... --out-format $(OUT_FORMAT) $(LINT_FLAGS) | tee ${REPORT_FILE}
lint-docker:
docker run -v $(PWD):/app -w /app $(GOLANGCI_LINT_IMAGE) \
- sh -c "golangci-lint run ./... --out-format $(OUT_FORMAT) $(LINT_FLAGS)"
+ sh -c "golangci-lint run ./... --out-format $(OUT_FORMAT) $(LINT_FLAGS) | tee ${REPORT_FILE}"
test: .GOPATH/.ok gitlab-pages
go test $(if $V,-v) $(allpackages)