summaryrefslogtreecommitdiff
path: root/tools/check-whitespace.sh
blob: 489322f9ca0c97931ed3aa353ffdd17ed02d9a14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

fail=0

if grep -n ' $' "$@"
then
  echo "^^^ The above files contain unwanted trailing spaces"
  fail=1
fi

if grep -n '	$' "$@"
then
  echo "^^^ The above files contain unwanted trailing tabs"
  fail=1
fi

# TODO: enable tab checking once all Empathy switched to TP coding style
#if grep -n '	' "$@"
#then
#  echo "^^^ The above files contain tabs"
#  fail=1
#fi

exit $fail