5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 20:40:27 +00:00
matterbridge/vendor/go.uber.org/multierr/Makefile

39 lines
874 B
Makefile
Raw Normal View History

2020-08-09 22:29:54 +00:00
# Directory to put `go install`ed binaries in.
export GOBIN ?= $(shell pwd)/bin
GO_FILES := $(shell \
find . '(' -path '*/.*' -o -path './vendor' ')' -prune \
-o -name '*.go' -print | cut -b3-)
.PHONY: build
build:
2020-08-09 22:29:54 +00:00
go build ./...
.PHONY: test
test:
2020-08-09 22:29:54 +00:00
go test -race ./...
.PHONY: gofmt
gofmt:
$(eval FMT_LOG := $(shell mktemp -t gofmt.XXXXX))
@gofmt -e -s -l $(GO_FILES) > $(FMT_LOG) || true
@[ ! -s "$(FMT_LOG)" ] || (echo "gofmt failed:" | cat - $(FMT_LOG) && false)
.PHONY: golint
golint:
2020-12-31 13:48:12 +00:00
@cd tools && go install golang.org/x/lint/golint
2020-08-09 22:29:54 +00:00
@$(GOBIN)/golint ./...
.PHONY: staticcheck
staticcheck:
2020-12-31 13:48:12 +00:00
@cd tools && go install honnef.co/go/tools/cmd/staticcheck
2020-08-09 22:29:54 +00:00
@$(GOBIN)/staticcheck ./...
.PHONY: lint
2020-08-09 22:29:54 +00:00
lint: gofmt golint staticcheck
.PHONY: cover
cover:
2021-10-16 21:11:32 +00:00
go test -race -coverprofile=cover.out -coverpkg=./... -v ./...
go tool cover -html=cover.out -o cover.html