Created
March 6, 2017 17:48
-
-
Save markburns/d92962f153f18c913eb838a558a635ea to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
function exists(){ | |
while read line | |
do | |
if [ -e $line ] | |
then | |
echo $line | |
fi | |
done < "${1:-/dev/stdin}" | |
} | |
git diff --name-only master head | grep "\.rb$" | exists | xargs rubocop -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment