2018-05-08 23:02:01 +01:00
|
|
|
.PHONY: test lint proto check-copyrights build-dev-deps
|
2018-04-25 15:55:26 +01:00
|
|
|
|
2018-04-23 17:05:52 +01:00
|
|
|
lint: check-copyrights
|
|
|
|
@echo "Running ${@}"
|
2018-04-25 15:55:26 +01:00
|
|
|
@gometalinter \
|
2018-04-06 17:32:34 +01:00
|
|
|
--deadline=60s \
|
|
|
|
--disable-all \
|
|
|
|
--enable=golint \
|
|
|
|
--enable=goimports \
|
|
|
|
--enable=vet \
|
|
|
|
--enable=deadcode \
|
2018-04-25 15:55:26 +01:00
|
|
|
--enable=goconst \
|
2018-04-06 17:32:34 +01:00
|
|
|
--exclude=.*\.pb\.go \
|
2018-04-25 15:55:26 +01:00
|
|
|
--exclude=.*_test.go \
|
2018-04-06 17:32:34 +01:00
|
|
|
./...
|
2018-04-12 14:50:22 +01:00
|
|
|
|
2018-04-23 17:05:52 +01:00
|
|
|
check-copyrights:
|
|
|
|
@echo "Running ${@}"
|
|
|
|
@./scripts/check-for-header.sh
|
|
|
|
|
2018-04-12 14:50:22 +01:00
|
|
|
proto:
|
|
|
|
@echo "Running ${@}"
|
2018-04-17 18:29:15 +01:00
|
|
|
./scripts/build-protos.sh
|
|
|
|
|
|
|
|
build-dev-deps:
|
2018-05-09 14:21:53 +01:00
|
|
|
go get github.com/golang/protobuf/protoc-gen-go
|
|
|
|
go get github.com/alecthomas/gometalinter
|
2018-04-25 15:55:26 +01:00
|
|
|
gometalinter --install --force
|
|
|
|
|
2018-05-08 23:02:01 +01:00
|
|
|
test: lint
|
|
|
|
go install -v ./...
|
|
|
|
go test ./...
|
2018-05-09 00:01:46 +01:00
|
|
|
@echo done
|