Browse Source

Prepare test image for exam and make some messages more explicit

content-update
xpetit 4 years ago
parent
commit
8b64ff0b32
No known key found for this signature in database
GPG Key ID: 4E1F8CF5DFA989D2
  1. 19
      go/tests/entrypoint.sh

19
go/tests/entrypoint.sh

@ -18,16 +18,21 @@ else
cat > "$first_file"
fi
# Check formatting
s=$(goimports -d .)
if test "$s"; then
echo '$ goimports -d .'
echo "$s"
exit 1
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 .)
if test "$s"; then
echo 'Your Go files are not correctly formatted :'
echo
echo '$ goimports -d .'
echo "$s"
exit 1
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
echo "print & println builtins are forbidden"
echo "Your Go files cannot use print & println builtins"
exit 1
fi

Loading…
Cancel
Save