-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 804 Bytes
/
Makefile
File metadata and controls
31 lines (23 loc) · 804 Bytes
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
go-fmt:
@echo -n Checking format...
@test $(shell goimports -l ./ | grep -v mock | wc -l) = 0 \
|| { echo; echo "some files are not properly formatted";\
echo $(shell goimports -l ./ | grep -v mock);\
exit 1;}\
@echo " everything formatted properly"
go-lint:
@echo -n Checking with linter...
@test $(shell golint ./... | wc -l) = 0 \
|| { echo; echo "some files are not properly linted";\
echo $(shell golint ./...);\
exit 1;}\
@echo " everything linted properly"
cover-report:
@go tool cover -html=coverage.out -o coverage.html
@go tool cover -func=coverage.out -o coverage-summary.txt
test:
@echo "Testing ..."
@go test -coverprofile=coverage.out -failfast ./...
test-with-report: test cover-report
code-up-to-date: go-fmt go-lint
all: code-up-to-date test-with-report