From 3c9e139aec08d1bb406a6219122ca982b4b7dc34 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 28 Sep 2025 00:45:33 -0400 Subject: Remove trailing white space in source files --- pre-commit.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 pre-commit.sh (limited to 'pre-commit.sh') diff --git a/pre-commit.sh b/pre-commit.sh new file mode 100755 index 0000000..3553140 --- /dev/null +++ b/pre-commit.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Pre-commit hook for ted development +# To install: +# ln -s ../../pre-commit.sh .git/hooks/pre-commit + +# Check for trailing whitespace +git grep -In ' $' && { echo 'Fix trailing whitespace!'; exit 1; } +git grep -In '\w'"$(printf '\t')"'$' && { echo 'Fix trailing whitespace!'; exit 1; } +exit 0 -- cgit v1.2.3