From daf9191393be199a68d47eaa9cc3b377d6a911e5 Mon Sep 17 00:00:00 2001 From: Kevin Franklin Kim Date: Thu, 31 Jul 2025 16:12:09 +0200 Subject: [PATCH] chore: add .husky --- Makefile | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5139087..3a264ee 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,20 @@ .DEFAULT_GOAL:=help +-include .makerc + +# --- Targets ----------------------------------------------------------------- + +# This allows us to accept extra arguments +%: .husky + @: + +.PHONY: .husky +# Configure git hooks for husky +.husky: + @if ! command -v husky &> /dev/null; then \ + echo "ERROR: missing executeable 'husky', please run:"; \ + echo "\n$ go install github.com/go-courier/husky/cmd/husky@latest\n"; \ + fi + @git config core.hooksPath .husky ## === Tasks === @@ -19,8 +35,8 @@ outdated: .PHONY: test ## Run tests test: - @GO_TEST_TAGS=-skip go test -coverprofile=coverage.out -race ./... - #@GO_TEST_TAGS=-skip go test -coverprofile=coverage.out -race -json ./... | gotestfmt + @GO_TEST_TAGS=-skip go test -coverprofile=coverage.out --tags=safe -race ./... + #@GO_TEST_TAGS=-skip go test -coverprofile=coverage.out --tags=safe -race -json ./... | gotestfmt .PHONY: test.demo ## Run tests