forked from dedis/kyber
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
38 lines (31 loc) · 818 Bytes
/
Makefile
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
all: test
gopath=$(shell go env GOPATH)
CODING = $(gopath)/src/github.com/dedis/Coding/bin
test_fmt:
@echo Checking correct formatting of files
@{ \
files=$$( go fmt ./... ); \
if [ -n "$$files" ]; then \
echo "Files not properly formatted: $$files"; \
exit 1; \
fi; \
if ! go vet ./...; then \
exit 1; \
fi \
}
test_lint:
@echo Checking linting of files
@{ \
GO111MODULE=off go get golang.org/x/lint; \
lintfiles=$$( golint ./... | egrep -v _test.go ); \
if [ -n "$$lintfiles" ]; then \
echo "Lint errors:"; \
echo "$$lintfiles"; \
exit 1; \
fi \
}
test_goveralls:
GO111MODULE=off go get github.com/mattn/goveralls
$(CODING)/coveralls.sh $(EXCLUDE_TEST)
$(gopath)/bin/goveralls -coverprofile=profile.cov -service=travis-ci || true
test: test_fmt test_lint test_goveralls