Last active
March 13, 2017 23:09
-
-
Save gusrub/108b22d58252e47da1e8315fed5a8b03 to your computer and use it in GitHub Desktop.
Check git changed files for ruby linter (rubocop)
This file contains 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 | |
CUR_PATH=$1 | |
if [ -z $CUR_PATH ] | |
then | |
CUR_PATH=`pwd` | |
fi | |
cd $CUR_PATH | |
git diff --name-only | xargs rubocop --format simple |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment