Skip to content

Instantly share code, notes, and snippets.

@stereosupersonic
Created September 20, 2017 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stereosupersonic/451f7dcde53bbd89f44e01f188548edd to your computer and use it in GitHub Desktop.
Save stereosupersonic/451f7dcde53bbd89f44e01f188548edd to your computer and use it in GitHub Desktop.
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