5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-14 03:50:26 +00:00
matterbridge/vendor/go.uber.org/atomic/Makefile

52 lines
1.0 KiB
Makefile
Raw Normal View History

# Many Go tools take file globs or directories as arguments instead of packages.
PACKAGE_FILES ?= *.go
2019-06-16 21:33:25 +00:00
# For pre go1.6
export GO15VENDOREXPERIMENT=1
.PHONY: build
build:
2019-06-16 21:33:25 +00:00
go build -i ./...
.PHONY: install
install:
glide --version || go get github.com/Masterminds/glide
glide install
.PHONY: test
test:
2019-06-16 21:33:25 +00:00
go test -cover -race ./...
.PHONY: install_ci
install_ci: install
go get github.com/wadey/gocovmerge
go get github.com/mattn/goveralls
go get golang.org/x/tools/cmd/cover
2019-06-16 21:33:25 +00:00
.PHONY: install_lint
install_lint:
go get golang.org/x/lint/golint
.PHONY: lint
lint:
@rm -rf lint.log
@echo "Checking formatting..."
@gofmt -d -s $(PACKAGE_FILES) 2>&1 | tee lint.log
@echo "Checking vet..."
2019-06-16 21:33:25 +00:00
@go vet ./... 2>&1 | tee -a lint.log;)
@echo "Checking lint..."
2019-06-16 21:33:25 +00:00
@golint $$(go list ./...) 2>&1 | tee -a lint.log
@echo "Checking for unresolved FIXMEs..."
@git grep -i fixme | grep -v -e vendor -e Makefile | tee -a lint.log
@[ ! -s lint.log ]
.PHONY: test_ci
test_ci: install_ci build
./scripts/cover.sh $(shell go list $(PACKAGES))