diff --git a/Makefile b/Makefile index d2e3c6a0d2..51dbd0c731 100644 --- a/Makefile +++ b/Makefile @@ -121,6 +121,9 @@ shellcheck-all-dockerized: docker build -t shellcheck-all $(CURDIR)/utilities/shellcheck-all docker run --rm -v "$(CURDIR):/scripts" shellcheck-all:latest +.PHONY: init-githook +init-githook: + git config core.hooksPath ./githooks/ # This defines a macro that can be used to add pre-commit targets # to check staged files (check-) or all files (check--all) diff --git a/docs/how-to-start.md b/docs/how-to-start.md index 8fe42dddc3..2bb19487d4 100644 --- a/docs/how-to-start.md +++ b/docs/how-to-start.md @@ -165,7 +165,7 @@ Even though development containers is a supported feature of `Docker for Desktop ### Setting up git hooks Git hooks are configured in the `.pre-commit-config.yaml` file using [pre-commit](https://pre-commit.com) -In order to use them install pre-commit, and run `git config core.hooksPath ./githooks/` from the collector root directory. +In order to use them install pre-commit, and run `make init-githook` from the collector root directory. ## Run in Minikube ### Build the collector image