summaryrefslogtreecommitdiff
path: root/scripts/check-no-tabs.sh
blob: 8eccad28b69725fbf29ad01b75a1feab58a94598 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh
# Fail if any C/C++ source in soh/ outside soh/include contains a tab.

cd "$(dirname "$0")/.." || exit 2

if git --no-pager grep -n "$(printf '\t')" -- 'soh/*.c' 'soh/*.cpp' 'soh/*.h' 'soh/*.hpp' ':!soh/include'; then
    echo "replace tabs with spaces"
    exit 1
fi