Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add init-githooks Makefile target #1850

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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-<linter name>) or all files (check-<linter name>-all)
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading