|
|
@ -18,16 +18,21 @@ else |
|
|
|
cat > "$first_file" |
|
|
|
cat > "$first_file" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Check formatting |
|
|
|
set +o nounset # TODO: Remove me after this variable is always set in all/tester/main.go |
|
|
|
|
|
|
|
if test "$SKIP_FORMATTING"; then |
|
|
|
s=$(goimports -d .) |
|
|
|
s=$(goimports -d .) |
|
|
|
if test "$s"; then |
|
|
|
if test "$s"; then |
|
|
|
|
|
|
|
echo 'Your Go files are not correctly formatted :' |
|
|
|
|
|
|
|
echo |
|
|
|
echo '$ goimports -d .' |
|
|
|
echo '$ goimports -d .' |
|
|
|
echo "$s" |
|
|
|
echo "$s" |
|
|
|
exit 1 |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
set -o nounset # TODO: Remove me after this variable is always set in all/tester/main.go |
|
|
|
|
|
|
|
|
|
|
|
if find . -type f -name '*.go' -exec grep -qE '\tprint(ln)?\(' {} +; then |
|
|
|
if find . -type f -name '*.go' -exec grep -qE '\tprint(ln)?\(' {} +; then |
|
|
|
echo "print & println builtins are forbidden" |
|
|
|
echo "Your Go files cannot use print & println builtins" |
|
|
|
exit 1 |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|