From fa6dadc98fed2aa25af79311b38abb97ec793824 Mon Sep 17 00:00:00 2001 From: Simon Baumer Date: Tue, 17 Sep 2024 16:28:13 +0200 Subject: [PATCH] Enable bracket expansion and add init-githooks make target --- .clang-format | 2 ++ Makefile | 3 +++ docs/how-to-start.md | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index d17114b0433..2e7b27223fd 100644 --- a/.clang-format +++ b/.clang-format @@ -7,6 +7,8 @@ PointerAlignment: Left IndentPPDirectives: AfterHash +InsertBraces: true + IncludeBlocks: Regroup IncludeCategories: - Regex: '^((\"|<)(api|internalapi|storage)/)' diff --git a/Makefile b/Makefile index d2e3c6a0d27..51dbd0c7317 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 8fe42dddc39..2bb19487d4f 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