populatedb-go/Makefile

33 lines
682 B
Makefile
Raw Normal View History

2022-12-05 08:44:16 +00:00
.PHONY: all test test-color coverage coverage-cli coverate-html lint format build
2022-11-06 09:21:32 +00:00
2022-12-05 08:44:16 +00:00
all: test-color lint format
2022-11-06 09:21:32 +00:00
go mod tidy
2022-12-05 08:44:16 +00:00
test:
go test -race -failfast ./...
2022-11-06 09:21:32 +00:00
test-color:
go install github.com/haunt98/go-test-color@latest
go-test-color -race -failfast ./...
2022-12-05 08:44:16 +00:00
coverage:
go test -coverprofile=coverage.out ./...
coverage-cli: coverage
go tool cover -func=coverage.out
coverage-html: coverage
go tool cover -html=coverage.out
2022-11-06 09:21:32 +00:00
lint:
golangci-lint run ./...
2022-12-05 08:44:16 +00:00
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 .
build:
go build ./cmd/populatedb