Skip to content

Instantly share code, notes, and snippets.

@paulz
Created February 15, 2018 19:10
Show Gist options
  • Save paulz/0e4c5bb617febdd1b7db8bfc632e6dd1 to your computer and use it in GitHub Desktop.
Save paulz/0e4c5bb617febdd1b7db8bfc632e6dd1 to your computer and use it in GitHub Desktop.
Rubocop modified Ruby and Rake files as Git Pre-commit Hook
FILES="$(git diff --cached --name-only --diff-filter=AMC *.rb *.rake)"
rubocop -a ${FILES}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment