2022-12-01 02:47:19 +00:00
|
|
|
.PHONY: all test test-color coverage coverage-cli coverate-html lint format build
|
2022-07-04 05:37:10 +00:00
|
|
|
|
2022-12-01 02:47:19 +00:00
|
|
|
all: test-color lint format
|
|
|
|
go mod tidy
|
2022-07-04 05:37:10 +00:00
|
|
|
|
|
|
|
test:
|
2022-07-30 16:09:57 +00:00
|
|
|
go test -race -failfast ./...
|
2022-07-04 05:37:10 +00:00
|
|
|
|
2022-12-01 02:47:19 +00:00
|
|
|
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
|
|
|
|
|
2022-07-04 05:37:10 +00:00
|
|
|
lint:
|
|
|
|
golangci-lint run ./...
|
2022-12-01 02:47:19 +00:00
|
|
|
|
|
|
|
format:
|
|
|
|
go install github.com/haunt98/gofimports/cmd/gofimports@latest
|
|
|
|
go install mvdan.cc/gofumpt@latest
|
|
|
|
go install mvdan.cc/sh/v3/cmd/shfmt@latest
|
|
|
|
gofimports -w -company github.com/make-go-great .
|
|
|
|
gofumpt -w -extra .
|
|
|
|
shfmt -w ./scripts
|
|
|
|
|
|
|
|
build:
|
|
|
|
go build ./cmd/dot
|