1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
# Set V to 1 for verbose output from the Makefile
Q=$(if $V,,@)
all: lint test
ci: test
.PHONY: all ci
#########################################
# Bootstrapping
#########################################
bootstrap:
$Q GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.30.0
.PHONY: bootstrap
#########################################
# Test
#########################################
test:
$Q $(GOFLAGS) go test -coverprofile=coverage.out ./...
race:
$Q $(GOFLAGS) go test -race ./...
.PHONY: test race
#########################################
# Linting
#########################################
fmt:
$Q gofmt -l -w $(SRC)
lint:
$Q LOG_LEVEL=error golangci-lint run --timeout=30m
.PHONY: lint fmt
|