Last active
September 11, 2019 22:38
-
-
Save midhunkrishna/fb904710a606ee5e9ba634dc3c4ac1d4 to your computer and use it in GitHub Desktop.
Precommit Hook
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/bash -l | |
echo "precommit running" | |
if (($(git diff --name-only --cached | grep ".rb" | wc -l) > 0)); then | |
echo "RuboCop autofix running..." | |
cd ~/vineti-platform/platform && bundle exec rubocop --fail-level A -a | |
exit $? | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment