From 38b4214cfbcd232c61cee5a771f637eb70747580 Mon Sep 17 00:00:00 2001 From: Krzysztof Rudnicki Date: Sat, 1 Nov 2025 16:02:58 +0100 Subject: [PATCH] chore: enforce shell_check via tracked pre-commit hook --- .githooks/pre-commit | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 .githooks/pre-commit diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100755 index 0000000..9192876 --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -euo pipefail + +repo_root=$(git rev-parse --show-toplevel) +cd "$repo_root" + +printf 'Running shell_check before committing...\n' + +if ! scripts/meta/shell_check.sh --skip-install; then + printf '\nCommit aborted: shell_check reported issues.\n' >&2 + printf 'Fix the lint problems and retry the commit.\n' >&2 + exit 1 +fi + +printf 'shell_check passed. Proceeding with commit.\n'