influxdb/.hooks/pre-commit

9 lines
238 B
Plaintext
Raw Normal View History

2014-06-23 16:53:50 +00:00
#!/usr/bin/env bash
count=`git ls-files | grep '.go$' | xargs gofmt -l | wc -l`
if [ $count -gt 0 ]; then
echo "Some files aren't formatted, please run 'make format' to format your source code before committing"
exit 1
fi
exit 0