Skip to content

Instantly share code, notes, and snippets.

@tadamcz
Last active January 19, 2022 11:29
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 tadamcz/14452e75f99df34c41c5b8a802adfb13 to your computer and use it in GitHub Desktop.
Save tadamcz/14452e75f99df34c41c5b8a802adfb13 to your computer and use it in GitHub Desktop.
Execute Rubocop on all files that appear in the diff. Faster than rubocop on all files.
git diff origin/master --name-only --diff-filter=ACMRTUXB | grep "\.rb$" | tr "\n" " " | xargs bundle exec rubocop -A --force-exclusion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment