pgweb/script/check_formatting.sh

12 lines
198 B
Bash
Raw Permalink Normal View History

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