diff options
Diffstat (limited to 'scripts/check-no-tabs.sh')
| -rwxr-xr-x | scripts/check-no-tabs.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/check-no-tabs.sh b/scripts/check-no-tabs.sh new file mode 100755 index 000000000..b469baed9 --- /dev/null +++ b/scripts/check-no-tabs.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# Fail if any C/C++ source in soh/ outside soh/include contains a tab. + +cd "$(dirname "$0")/.." || exit 2 + +if git grep -n "$(printf '\t')" -- 'soh/*.c' 'soh/*.cpp' 'soh/*.h' 'soh/*.hpp' ':!soh/include'; then + echo "replace tabs with spaces" + exit 1 +fi |
