Test drone

This commit is contained in:
Olivier Gambier 2014-11-07 15:45:51 -08:00
parent 378256de47
commit 9fd57ab42b
4 changed files with 70 additions and 5 deletions

18
hack/validate_gofmt.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/bash
badFiles=($(find ./ -iname "*.go" -exec gofmt -s -l {} \;))
if [ ${#badFiles[@]} -eq 0 ]; then
echo 'Congratulations! All Go source files are properly formatted.'
else
{
echo "These files are not properly gofmt'd:"
for f in "${badFiles[@]}"; do
echo " - $f"
done
echo
echo 'Please reformat the above files using "gofmt -s -w" and commit the result.'
echo
} >&2
false
fi