pgweb/script/check_formatting.sh

13 lines
226 B
Bash
Raw Normal View History

2018-03-16 19:59:58 -05:00
#!/bin/bash
files="$(go fmt ./...)"
ignore="pkg/data/bindata.go"
files=${files[@]/$ignore}
if [ -n "$files" ]; then
echo "Go code is not formatted: $files"
for file in $files; do
echo "----> $file"
done
exit 1
fi