mirror of
https://github.com/urbit/shrub.git
synced 2024-11-27 10:26:14 +03:00
ci: reject trailing whitespace
This commit is contained in:
parent
f4ed556717
commit
16ae3b7298
@ -5,6 +5,7 @@ install:
|
||||
- nix-env -iA cachix -f https://cachix.org/api/v1/install
|
||||
|
||||
before_install:
|
||||
- ./sh/test-whitespace
|
||||
- git lfs pull
|
||||
|
||||
script:
|
||||
|
14
sh/test-whitespace
Executable file
14
sh/test-whitespace
Executable file
@ -0,0 +1,14 @@
|
||||
#!/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
|
Loading…
Reference in New Issue
Block a user