Skip to content

Instantly share code, notes, and snippets.

@wonderer80
Created March 26, 2019 07:28
Show Gist options
  • Save wonderer80/b0dbf3d23ba391d8965b75b80e3ce705 to your computer and use it in GitHub Desktop.
Save wonderer80/b0dbf3d23ba391d8965b75b80e3ce705 to your computer and use it in GitHub Desktop.
staging 된 파일들을 rubocop 자동 교정
#!/bin/sh
#
FILES="$(git diff --cached --name-only --diff-filter=AMC | grep "\.rb$" | tr '\n' ' ')"
bundle exec rubocop -a ${FILES}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment