diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2020-05-28 03:47:15 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2020-05-28 04:11:36 +0300 |
commit | d92f6f44ac5910215a5286839c534760df8d071b (patch) | |
tree | ea4e8381fcbb6c29d088ee52254c0a92732a2c0d | |
parent | f98b87053275008e9921099872af9c1bcd16e219 (diff) |
Add REPORT_FILE to makefile
-rw-r--r-- | Makefile.util.mk | 6 |
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) |