-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
34 lines (29 loc) · 786 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
.PHONY:build
build: go-fmt go-vet
@echo "building the autocomplete executable"
@echo "gopath being used is ${GOPATH}"
@echo "goroot being used is ${GOROOT}"
go build -x -v -o gia cmd/main.go
@echo "executable created gia"
.PHONY:unit-test
unit-test:
@echo "running unit tests"
go test -v `go list ./... | grep -v test/`
.PHONY:coverage
coverage:
@echo "testing the autocomplete package"
go test -cover -v -timeout 60s -coverprofile=coverage.out ./...
go tool cover -func=coverage.out
go tool cover -html=coverage.out
.PHONY:clean
clean:
@echo "cleaning the autocomplete package"
rm -f gia coverage.out coverage.html
.PHONY:go-fmt
go-fmt:
@echo "formatting the go files using gofmt"
gofmt -l -w .
.PHONY:go-vet
go-vet:
@echo "go vet of the package"
go vet -v ./...