Skip to content

Instantly share code, notes, and snippets.

@ota42y
Created October 30, 2018 04:07
Show Gist options
  • Save ota42y/10c9968cd516d0e8a00d9c6f93194805 to your computer and use it in GitHub Desktop.
Save ota42y/10c9968cd516d0e8a00d9c6f93194805 to your computer and use it in GitHub Desktop.
desc 'execute rubocop git diff file only'
task diff_rubocop: :environment do
system('rubocop -a $( git diff --name-only --diff-filter=AMRC | grep -e ".*\.rb" | paste -s - )')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment