Skip to content

Commit 9646a25

Browse files
committed
chore: add Makefile
1 parent 625998f commit 9646a25

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.POSIX:
2+
.SUFFIXES:
3+
4+
all: test lint
5+
6+
test:
7+
go test -race -shuffle=on -cover ./...
8+
9+
test/cover:
10+
go test -race -shuffle=on -coverprofile=coverage.out ./...
11+
go tool cover -html=coverage.out
12+
13+
lint:
14+
golangci-lint run
15+
16+
tidy:
17+
go mod tidy
18+
19+
generate:
20+
go generate ./...
21+
22+
pre-commit: .git/hooks/pre-commit test lint tidy generate
23+
git diff --exit-code
24+
25+
.git/hooks/pre-commit:
26+
echo "make pre-commit" > .git/hooks/pre-commit
27+
chmod +x .git/hooks/pre-commit

0 commit comments

Comments
 (0)