Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
rubocop git hook pre-push
#!/bin/sh
echo "pre-push"
echo "Starting rubocop"
bundle exec rubocop
if [ $? -ne 0 ]; then
echo ""
echo ""
echo "Rubocop failed; push aborted!"
exit 1
fi
echo
echo "All pre-push checks passed! Pushing to remote"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.