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-22 07:40:50 +0300
committerJaime Martinez <jmartinez@gitlab.com>2020-05-28 04:11:11 +0300
commitfebba427ebf268ac498f0eda09d5f9818ff2bf10 (patch)
tree92e910953ba6d2a0bbd091ce538db7650503ab78 /Makefile.util.mk
parent9051ec94f18b67f4729da2a432591785643bd785 (diff)
Add lint and lint-docker rules to Makefile
Remove references to ./bin/golint, ./bin/gocycle and remove _support/ directory. Add formatting rule to .golangci.yml for goimports and local imports.
Diffstat (limited to 'Makefile.util.mk')
-rw-r--r--Makefile.util.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile.util.mk b/Makefile.util.mk
index 2d90172a..c49b58bb 100644
--- a/Makefile.util.mk
+++ b/Makefile.util.mk
@@ -1,8 +1,12 @@
+# Dockerfile https://gitlab.com/gitlab-org/gitlab-build-images/-/blob/master/Dockerfile.golangci-lint-alpine
GOLANGCI_LINT_IMAGE := registry.gitlab.com/gitlab-org/gitlab-build-images:golangci-lint-alpine
.PHONY: lint test race acceptance bench cover list deps-check deps-download
-lint: deps-download
+lint: .GOPATH/.ok bin/golangci-lint
+ $Q ./bin/golangci-lint run $(if $V,-v)
+
+lint-docker:
docker run -v $(PWD):/app -w /app $(GOLANGCI_LINT_IMAGE) \
sh -c "golangci-lint run --out-format code-climate | tee gl-code-quality-report.json | jq -r '.[] | \"\(.location.path):\(.location.lines.begin) \(.description)\"'"