Last active
November 19, 2021 18:41
-
-
Save sephraim/d4bcba6e35bd9d94815b898636946e24 to your computer and use it in GitHub Desktop.
[Rubocop diff] Run rubocop on changed files only
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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