1
1
mirror of https://github.com/urbit/shrub.git synced 2024-12-25 04:52:06 +03:00
shrub/sh/test-whitespace
2020-01-03 21:54:35 +01:00

15 lines
311 B
Bash
Executable File

#!/usr/bin/env bash
whitespace=$(find . \
\( -path ./.git -o \
-path ./nix -o \
-path ./bin \) -prune \
-o -type f -exec egrep -lI " +$" {} \;);
if [ ! -z "$whitespace" ]
then
echo "found trailing whitespace in:";
echo "$whitespace";
exit 1;
fi