2022-12-30 09:32:52 +00:00
|
|
|
.PHONY: all test test-color coverage coverage-cli coverage-html lint format gen format-html
|
2022-07-12 06:57:31 +00:00
|
|
|
|
2023-01-22 04:55:58 +00:00
|
|
|
all:
|
2022-12-25 19:18:02 +00:00
|
|
|
go mod tidy
|
2023-01-22 04:55:58 +00:00
|
|
|
$(MAKE) test-color
|
|
|
|
$(MAKE) lint
|
|
|
|
$(MAKE) format
|
|
|
|
$(MAKE) gen
|
|
|
|
$(MAKE) format-html
|
2022-12-25 19:18:02 +00:00
|
|
|
|
|
|
|
test:
|
|
|
|
go test -race -failfast ./...
|
|
|
|
|
|
|
|
test-color:
|
|
|
|
go install github.com/haunt98/go-test-color@latest
|
|
|
|
go-test-color -race -failfast ./...
|
|
|
|
|
|
|
|
coverage:
|
|
|
|
go test -coverprofile=coverage.out ./...
|
|
|
|
|
2023-01-22 04:55:58 +00:00
|
|
|
coverage-cli:
|
|
|
|
$(MAKE) coverage
|
2022-12-25 19:18:02 +00:00
|
|
|
go tool cover -func=coverage.out
|
|
|
|
|
2023-01-22 04:55:58 +00:00
|
|
|
coverage-html:
|
|
|
|
$(MAKE) coverage
|
2022-12-25 19:18:02 +00:00
|
|
|
go tool cover -html=coverage.out
|
|
|
|
|
|
|
|
lint:
|
|
|
|
golangci-lint run ./...
|
|
|
|
|
|
|
|
format:
|
|
|
|
go install github.com/haunt98/gofimports/cmd/gofimports@latest
|
|
|
|
go install mvdan.cc/gofumpt@latest
|
2023-01-21 19:29:57 +00:00
|
|
|
gofimports -w --company github.com/make-go-great .
|
2022-12-25 19:18:02 +00:00
|
|
|
gofumpt -w -extra .
|
2022-07-12 06:57:31 +00:00
|
|
|
|
|
|
|
gen:
|
|
|
|
go run .
|
2022-12-30 09:32:52 +00:00
|
|
|
|
|
|
|
format-html:
|
2023-02-28 05:52:55 +00:00
|
|
|
bun install --no-save prettier
|
2023-01-22 05:18:44 +00:00
|
|
|
bun prettier --write .
|