Created
December 10, 2020 14:03
-
-
Save evanlouden/bad53ee619dbff3be4d40a317e54ceae to your computer and use it in GitHub Desktop.
Standard RB pre-commit 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
FILES=$(git diff --cached --name-only --diff-filter=ACMR "*.rb"| sed 's| |\\ |g') | |
[ -z "$FILES" ] | |
echo "$FILES" | xargs bundle exec standardrb --fix | |
echo "$FILES" | xargs git add |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment