Browse Source

Enforce good formatting

content-update
xpetit 4 years ago
parent
commit
1ac9a236e0
No known key found for this signature in database
GPG Key ID: 97C60669182C17A5
  1. 9
      go/exam/entrypoint.sh

9
go/exam/entrypoint.sh

@ -13,8 +13,13 @@ first_file=$(echo "$EXPECTED_FILES" | cut -d' ' -f1)
mkdir -p "$(dirname "$first_file")"
cat > "$first_file"
# Format code
goimports -w .
# Check formatting
s=$(goimports -d .)
if test "$s"; then
echo '$ goimports -d .'
echo "$s"
exit 1
fi
# Check restrictions
if test "$ALLOWED_FUNCTIONS" && test "$EXPECTED_FILES"; then

Loading…
Cancel
Save