grafana/.hooks/pre-commit
2016-09-15 13:09:33 +02:00

11 lines
252 B
Bash
Executable File

#!/usr/bin/env bash
test -z "$(gofmt -s -l . | grep -v vendor/src/ | tee /dev/stderr)"
if [ $? -gt 0 ]; then
echo "Some files aren't formatted, please run 'go fmt ./pkg/...' to format your source code before committing"
exit 1
fi
grunt test