summaryrefslogtreecommitdiffhomepage
path: root/test/check-for-trailing-whitespace.sh
blob: 00be038f34c81651937061ea374504fa0ca0bd83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash

cd .. || exit
# print first
grep -EHInr '( +)$' ./*

var=$(grep -EHInr '( +)$' ./*)
# then exit with fail if found
if test -z "$var"; then
  exit 0
else
  exit 1
fi