Fix formatting tests to exclude Godeps

This commit is contained in:
Praneeth Bodduluri 2015-12-23 10:54:09 +05:30
parent 7ac0323de3
commit 34dcae78de

View File

@ -1,8 +1,15 @@
#!/bin/bash
if [[ -n "$(gofmt -l .)" ]]; then
echo "Bad formatting, run make format-gosuper to fix it."
exit 1
else
echo "Formatting test passed."
fi
DIRS=`ls -l . | egrep '^d' | awk '{print $9}'`
DIRS=`echo $DIRS | sed "s/Godeps//g"`
# and finally loop over the cleaned up directory list.
for DIR in $DIRS
do
if [[ -n "$(gofmt -l ${DIR})" ]]; then
echo "Bad formatting, run make format-gosuper to fix it."
exit 1
fi
done
echo "Formatting test passed."