Last active
January 15, 2021 08:33
-
-
Save qr8r/70510a0bc0cb54fd8427 to your computer and use it in GitHub Desktop.
Pre commit: Run staged files through rubo cop
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/sh | |
git diff --cached | \ | |
sed -rn "s/^([+]{3}|[-]{3})\s(a|b)\/(.*)/\3/p" | \ | |
uniq | \ | |
xargs rubocop --force-exclusion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment