Skip to content

Instantly share code, notes, and snippets.

@sephraim
Last active November 19, 2021 18:41
Show Gist options
  • Save sephraim/d4bcba6e35bd9d94815b898636946e24 to your computer and use it in GitHub Desktop.
Save sephraim/d4bcba6e35bd9d94815b898636946e24 to your computer and use it in GitHub Desktop.
[Rubocop diff] Run rubocop on changed files only
#!/bin/zsh
set -eu
# Run Rubocop on changed files only
git diff --name-only --diff-filter=d upstream/develop | xargs bundle exec rubocop --only-recognized-file-types "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment