forked from DiFronzo/blockchair
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (22 loc) · 793 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
.PHONY: test
test: ## Runs all unit, integration and example tests.
go test -race -v .
.PHONY: vet
vet: ## Runs go vet (to detect suspicious constructs).
go vet .
.PHONY: fmt
fmt: ## Runs go fmt (to check for go coding guidelines).
gofmt -d -s .
.PHONY: staticcheck
staticcheck: ## Runs static analysis to prevend bugs, foster code simplicity, performance and editor integration.
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck .
.PHONY: lint
lint: ## Runs golint (to check for go coding guidelines).
go install golang.org/x/lint/golint@latest
golint .
.PHONY: version
version: ## Runs go version (to check for go verion used).
@go version
.PHONY: all
all: test vet fmt staticcheck lint ## Runs all source code quality targets (like test, vet, fmt, staticcheck)