Skip to content

Instantly share code, notes, and snippets.

@gusrub
Last active March 13, 2017 23:09
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 gusrub/108b22d58252e47da1e8315fed5a8b03 to your computer and use it in GitHub Desktop.
Save gusrub/108b22d58252e47da1e8315fed5a8b03 to your computer and use it in GitHub Desktop.
Check git changed files for ruby linter (rubocop)
#!/bin/bash
CUR_PATH=$1
if [ -z $CUR_PATH ]
then
CUR_PATH=`pwd`
fi
cd $CUR_PATH
git diff --name-only | xargs rubocop --format simple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment