2024-03-19 17:55:57 -07:00
|
|
|
MAIN_PACKAGE_PATH := .
|
|
|
|
TARGET_DIR := .
|
|
|
|
TARGET := asdf
|
|
|
|
|
|
|
|
# Not sure what the default location should be for builds
|
|
|
|
build: test lint
|
|
|
|
go build -o=${TARGET_DIR}/${TARGET} ${MAIN_PACKAGE_PATH}
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
go fmt ./...
|
2024-04-30 07:13:05 -07:00
|
|
|
gofumpt -l -w .
|
2024-03-19 17:55:57 -07:00
|
|
|
|
|
|
|
verify:
|
|
|
|
go mod verify
|
|
|
|
|
|
|
|
tidy:
|
|
|
|
go mod tidy -v
|
|
|
|
|
|
|
|
audit: verify vet test
|
|
|
|
|
|
|
|
test:
|
2024-05-03 18:42:04 -07:00
|
|
|
go test -coverprofile=/tmp/coverage.out -bench= -race ./...
|
2024-03-19 17:55:57 -07:00
|
|
|
|
|
|
|
cover: test
|
|
|
|
go tool cover -html=/tmp/coverage.out
|
|
|
|
|
|
|
|
lint: fmt
|
|
|
|
staticcheck -tests -show-ignored ./...
|
2024-04-30 07:13:05 -07:00
|
|
|
revive -set_exit_status ./...
|
2024-03-19 17:55:57 -07:00
|
|
|
|
|
|
|
vet: fmt
|
|
|
|
go vet .
|
|
|
|
|
|
|
|
run: build
|
|
|
|
${TARGET_DIR}/${TARGET}
|
|
|
|
|
|
|
|
.PHONY: fmt lint vet build test run
|