pgweb/script/check_formatting.sh

12 lines
198 B
Bash
Raw Permalink Normal View History

2018-03-16 19:59:58 -05:00
#!/bin/bash
2018-03-16 20:15:06 -05:00
# Get list of offending files
2018-03-16 20:04:08 -05:00
files="$(go fmt ./pkg/...)"
2018-03-16 19:59:58 -05:00
if [ -n "$files" ]; then
2018-03-16 20:15:06 -05:00
echo "Go code is not formatted:"
2018-03-16 19:59:58 -05:00
for file in $files; do
echo "----> $file"
done
exit 1
fi