Skip to content

Instantly share code, notes, and snippets.

@jbodah
Last active July 18, 2016 16:20
Show Gist options
  • Save jbodah/b797e44688275718fe9ecbaa78fba623 to your computer and use it in GitHub Desktop.
Save jbodah/b797e44688275718fe9ecbaa78fba623 to your computer and use it in GitHub Desktop.
pre-push2
##
# Run syntax checks before pushing
#
# Installation:
# 1. Copy this gist to .git/hooks/pre-push
# 2. chmod +x .git/hooks/pre-push
#
# NOTE: you can also just call `rubocop --auto-correct` if you would rather
#! /usr/bin/env sh
git diff master --name-only | xargs rubocop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment