Skip to content

Commit f08315b

Browse files
committed
refactor: switch from Taskfile to Makefile
1 parent 777bbc5 commit f08315b

2 files changed

Lines changed: 45 additions & 33 deletions

File tree

Makefile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## help: print this help message
2+
.PHONY: help
3+
help:
4+
@echo 'Usage:'
5+
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
6+
7+
## audit: format, vet and test all code
8+
.PHONY: audit
9+
audit:
10+
@echo 'Formatting code...'
11+
go fmt ./...
12+
@echo 'Vetting code...'
13+
go vet ./...
14+
@echo 'Running tests...'
15+
go test -short -race -vet=off ./...
16+
17+
## test: run tests
18+
.PHONY: test
19+
test:
20+
go test -shuffle=on -short -vet=off -race -timeout 15s -covermode=atomic -coverprofile=/tmp/profile.out ./...
21+
22+
## cover: run test coverage
23+
.PHONY: cover
24+
cover:
25+
go test -short -covermode=count -coverprofile=/tmp/profile.out ./...
26+
27+
## analyze: analyze test coverage in your browser
28+
.PHONY: analyze
29+
analyze: cover
30+
go tool cover -html=/tmp/profile.out
31+
32+
## lint: run linters
33+
.PHONY: lint
34+
lint:
35+
golangci-lint run --fix ./...
36+
37+
## fix: run go fix
38+
.PHONY: fix
39+
fix:
40+
go fix ./...
41+
42+
## verify: fix, lint and test
43+
.PHONY: verify
44+
verify: fix lint test
45+
go mod verify

Taskfile.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)