Browse Source

Conditional install of linter.

Make command for "test"
pull/661/head
Sukhjit Singh 4 years ago
parent
commit
4475f8548d
  1. 7
      Makefile

7
Makefile

@ -1,8 +1,13 @@
GOBIN=$(shell pwd)/bin GOBIN=$(shell pwd)/bin
install-lint: install-lint:
@curl -sSfL -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.42.0 @if [ ! -f "$(GOBIN)/golangci-lint" ]; then \
curl -sSfL -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.42.0; \
fi
lint: install-lint lint: install-lint
@echo "golangci-lint run ../..." @echo "golangci-lint run ../..."
@$(GOBIN)/golangci-lint run ./... @$(GOBIN)/golangci-lint run ./...
test:
go test -race -failfast ./...

Loading…
Cancel
Save