Created
March 23, 2022 03:26
-
-
Save thrgamon/d28b587e1d94d4e42e1deb38125710b5 to your computer and use it in GitHub Desktop.
Lint with Standardrb pre-push hook
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 | |
Files=$(git diff --name-only --diff-filter=d `git merge-base origin/master HEAD` | grep -E "\.rb$" | grep -v "^db") | |
if [ ! -z "$Files" ] | |
then | |
bundle exec standardrb $Files | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment