populatedb-go/Makefile

42 lines
807 B
Makefile
Raw Normal View History

2023-02-25 17:03:06 +00:00
.PHONY: all test test-color coverage coverage-cli coverate-html lint format build clean
2022-11-06 09:21:32 +00:00
2023-02-25 17:03:06 +00:00
all:
2022-11-06 09:21:32 +00:00
go mod tidy
2023-02-25 17:03:06 +00:00
$(MAKE) test-color
$(MAKE) lint
$(MAKE) format
$(MAKE) build
$(MAKE) clean
2022-11-06 09:21:32 +00:00
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
2023-02-25 17:03:06 +00:00
gofimports -w --company github.com/make-go-great,github.com/haunt98 .
2022-12-05 08:44:16 +00:00
gofumpt -w -extra .
build:
2023-02-25 17:03:06 +00:00
$(MAKE) clean
2022-12-05 08:44:16 +00:00
go build ./cmd/populatedb
2023-02-25 17:03:06 +00:00
clean:
rm -rf populatedb