posts-go/Makefile

34 lines
690 B
Makefile
Raw Normal View History

2022-12-25 19:18:02 +00:00
.PHONY: all test test-color coverage coverage-cli coverage-html lint format gen
2022-07-12 06:57:31 +00:00
2022-12-25 19:18:02 +00:00
all: test-color lint format gen
go mod tidy
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 ./...
coverage-cli: coverage
go tool cover -func=coverage.out
coverage-html: coverage
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
gofimports -w -company github.com/make-go-great .
gofumpt -w -extra .
2022-12-30 09:26:06 +00:00
yarn prettier --write .
2022-07-12 06:57:31 +00:00
gen:
go run .