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 | |
# This file is `.git/hooks/format-ruby` and it has been `chmod +x`'d | |
# Assumption: https://github.com/testdouble/standard is in your Gemfile | |
set -e | |
rubyfiles=$(git diff --cached --name-only --diff-filter=ACM "*.rb" "*.rake" "Gemfile" "Rakefile" | tr '\n' ' ') | |
[ -z "$rubyfiles" ] && exit 0 | |
# Standardize all ruby files |