pgweb/script/check_formatting.sh
2018-03-16 20:04:08 -05:00

13 lines
230 B
Bash
Executable File

#!/bin/bash
files="$(go fmt ./pkg/...)"
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