forked from rookie-ninja/rk-query
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (28 loc) · 768 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
.PHONY: all
all: test lint doctoc fmt gomod
.PHONY: lint
lint:
@echo "[golangci-lint] Running golangci-lint..."
@golangci-lint run 2>&1
@echo "------------------------------------[Done]"
.PHONY: test
test:
@echo "[test] Running go test..."
@go test ./... -coverprofile coverage.txt 2>&1
@go tool cover -html=coverage.txt
@echo "------------------------------------[Done]"
.PHONY: fmt
fmt:
@echo "[fmt] Formatting go project..."
@gofmt -s -w . 2>&1
@echo "------------------------------------[Done]"
.PHONY: doctoc
doctoc:
@echo "[doctoc] Running doctoc..."
@doctoc . 2>&1
@echo "------------------------------------[Done]"
.PHONY: gomod
gomod:
@echo "[go-mod] Running gomod tidy..."
@go mod tidy
@echo "------------------------------------[Done]"