-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGNUmakefile
35 lines (26 loc) · 952 Bytes
/
GNUmakefile
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
.PHONY: fmt goimports gci test cover lint upgrade download install-tools
fmt:
@echo "==> Fixing source code with gofmt..."
gofmt -s -w .
# Keep for backward compatibility
goimports: gci
gci:
@echo "==> Fixing imports code with gci"
gci write -s standard -s default -s "prefix(github.com/indykite/neo4j-graph-tool-core)" -s blank -s dot .
generate_mocks:
cd test && go generate
test:
go test -v -cpu 4 -covermode=count -coverpkg github.com/indykite/neo4j-graph-tool-core/... -coverprofile=coverage.out ./...
cover: test
go tool cover -html=coverage.out
lint:
golangci-lint run --timeout 2m0s ./...
upgrade:
go get -u all && go mod tidy
install-tools: download
@echo Installing tools
@go install github.com/daixiang0/gci@latest
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
@go install github.com/golang/mock/mockgen@latest
@go install github.com/onsi/ginkgo/v2/ginkgo@latest
@echo Installation completed