diff options
author | Ian Moffett <ian@osmora.org> | 2025-03-27 02:27:16 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-03-27 02:27:16 -0400 |
commit | c772d185ddf06de7650ea3da2f644d4900de76b4 (patch) | |
tree | 83cf80f0c44f5674cfb4af41f9839b39767b6a01 /builddeps | |
parent | b18c474be6a941937bc385fc8a1ddc28ae56be0f (diff) |
build: Add hooks builddep
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'builddeps')
-rwxr-xr-x | builddeps/hooks/prepare-commit-msg | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/builddeps/hooks/prepare-commit-msg b/builddeps/hooks/prepare-commit-msg new file mode 100755 index 0000000..df189ba --- /dev/null +++ b/builddeps/hooks/prepare-commit-msg @@ -0,0 +1,15 @@ +#!/bin/bash + +# Do we have whitespace errors? +files=$(git diff --cached --name-only) + +for file in $files +do + perl tools/checknl.pl $file 1>/dev/null + if [[ $? -ne 0 ]] + then + echo "** Failed to commit" + echo "** Whitespace error in $file" + exit 1 + fi +done |