Skip to content

Instantly share code, notes, and snippets.

@naoty
Created July 17, 2015 02:48
Show Gist options
  • Save naoty/668dc1a41c4a1474baa3 to your computer and use it in GitHub Desktop.
Save naoty/668dc1a41c4a1474baa3 to your computer and use it in GitHub Desktop.
コミット前にコミット予定のファイルをrubocopで検査するフックスクリプト
#!/bin/sh
rubocop --auto-correct `git diff --cached --name-only | grep .rb`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment