forked from rookie-ninja/rk-common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (28 loc) · 752 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: buf test lint doctoc fmt
.PHONY: buf
buf:
@echo "[buf] Running buf..."
@buf generate
@echo "------------------------------------[Done]"
.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]"