pgweb/script/check_formatting.sh

13 lines
230 B
Bash
Raw Normal View History

2018-03-17 03:59:58 +03:00
#!/bin/bash
2018-03-17 04:04:08 +03:00
files="$(go fmt ./pkg/...)"
2018-03-17 03:59:58 +03:00
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