From bf4015de0d728f71b5e4c5b9beff1af2dd2a9609 Mon Sep 17 00:00:00 2001 From: Vanshaj Date: Mon, 11 Jul 2022 18:56:06 +0530 Subject: [PATCH] #903: added vet flag to resolve race issue --- Makefile | 60 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index be11de32187..324c7d8f09c 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,30 @@ -GOLANGCI_LINT_VERSION = $(shell head -n 1 .golangci.yml | tr -d '\# ') -TMPDIR ?= /tmp - -all: build - -build : - go build - -format : - find . -name '*.go' -exec gofmt -s -w {} + - -ci-like-lint : - @docker run --rm -t -v $(shell pwd):/app \ - -v $(TMPDIR)/golangci-cache-$(GOLANGCI_LINT_VERSION):/golangci-cache \ - --env "GOLANGCI_LINT_CACHE=/golangci-cache" \ - -w /app golangci/golangci-lint:$(GOLANGCI_LINT_VERSION) \ - make lint - -lint : - golangci-lint run --out-format=tab --new-from-rev master ./... - -tests : - go test -race -timeout 210s ./... - -check : ci-like-lint tests - -container: - docker build --rm --pull --no-cache -t grafana/k6 . - -.PHONY: build format ci-like-lint lint tests check container +GOLANGCI_LINT_VERSION = $(shell head -n 1 .golangci.yml | tr -d '\# ') +TMPDIR ?= /tmp + +all: build + +build : + go build + +format : + find . -name '*.go' -exec gofmt -s -w {} + + +ci-like-lint : + @docker run --rm -t -v $(shell pwd):/app \ + -v $(TMPDIR)/golangci-cache-$(GOLANGCI_LINT_VERSION):/golangci-cache \ + --env "GOLANGCI_LINT_CACHE=/golangci-cache" \ + -w /app golangci/golangci-lint:$(GOLANGCI_LINT_VERSION) \ + make lint + +lint : + golangci-lint run --out-format=tab --new-from-rev master ./... + +tests : + go test -race -timeout 210s ./... -vet=off + +check : ci-like-lint tests + +container: + docker build --rm --pull --no-cache -t grafana/k6 . + +.PHONY: build format ci-like-lint lint tests check container