Skip to content

Instantly share code, notes, and snippets.

@thrgamon
Created March 23, 2022 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thrgamon/d28b587e1d94d4e42e1deb38125710b5 to your computer and use it in GitHub Desktop.
Save thrgamon/d28b587e1d94d4e42e1deb38125710b5 to your computer and use it in GitHub Desktop.
Lint with Standardrb pre-push hook
#!/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