Browse Source

Prepare test image for exam and make some messages more explicit

pull/682/head
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" cat > "$first_file"
fi fi
# Check formatting set +o nounset # TODO: Remove me after this variable is always set in all/tester/main.go
s=$(goimports -d .) if test "$SKIP_FORMATTING"; then
if test "$s"; then s=$(goimports -d .)
echo '$ goimports -d .' if test "$s"; then
echo "$s" echo 'Your Go files are not correctly formatted :'
exit 1 echo
echo '$ goimports -d .'
echo "$s"
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

Loading…
Cancel
Save