Last active
November 23, 2016 18:53
-
-
Save trekdemo/be52b6bfe217bc31077d0f14eaf032d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Put this file into your .git/hooks directory and make it | |
# executable. | |
# | |
# A hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook exits | |
# with non-zero status if the Rubocop check fails. | |
# Redirect output to stderr. | |
exec 1>&2 | |
git diff --cached --name-only | grep '\.rb' | xargs rubocop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment