Added find whitepsace check

This commit is contained in:
Dennis Eichhorn 2018-07-12 20:44:42 +02:00
parent 51cb526d8f
commit f03d879a9f

View File

@ -38,4 +38,10 @@ if [[ "$FILE" =~ ^.+(sh)$ ]]; then
fi fi
fi fi
# Check whitespace end of line
if [[ -n $(find $FILE -type f -exec egrep -l " +$" {} \;) ]]; then
echo -e "\e[1;31m\tFound whitespace at end of line.\e[0m" >&2
exit 1
fi
done || exit $? done || exit $?