Skip to content

Commit a6b56b1

Browse files
committed
chore: add Makefile
1 parent 27faa0c commit a6b56b1

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

Makefile

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.POSIX:
2+
.SUFFIXES:
3+
4+
all: test lint
5+
6+
test:
7+
go test -race -shuffle=on -cover ./...
8+
9+
lint:
10+
golangci-lint run
11+
12+
tidy:
13+
go mod tidy
14+
15+
readme:
16+
python3 scripts/generate_readme.py
17+
18+
# run `make pre-commit` once to install the hook.
19+
pre-commit: .git/hooks/pre-commit test lint tidy readme
20+
git diff --exit-code
21+
22+
.git/hooks/pre-commit:
23+
echo "make pre-commit" > .git/hooks/pre-commit
24+
chmod +x .git/hooks/pre-commit

scripts/generate_problem.py

100755100644
File mode changed.

scripts/generate_readme.py

100755100644
File mode changed.

0 commit comments

Comments
 (0)