5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-28 04:25:39 +00:00
matterbridge/vendor/go.uber.org/atomic/Makefile

36 lines
664 B
Makefile
Raw Normal View History

2020-08-09 22:29:54 +00:00
# Directory to place `go install`ed binaries into.
export GOBIN ?= $(shell pwd)/bin
2020-08-09 22:29:54 +00:00
GOLINT = $(GOBIN)/golint
2020-08-09 22:29:54 +00:00
GO_FILES ?= *.go
.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 ./...
2020-08-09 22:29:54 +00:00
.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)
2020-08-09 22:29:54 +00:00
$(GOLINT):
go install golang.org/x/lint/golint
2019-06-16 21:33:25 +00:00
2020-08-09 22:29:54 +00:00
.PHONY: golint
golint: $(GOLINT)
$(GOLINT) ./...
.PHONY: lint
2020-08-09 22:29:54 +00:00
lint: gofmt golint
.PHONY: cover
cover:
go test -coverprofile=cover.out -coverpkg ./... -v ./...
go tool cover -html=cover.out -o cover.html