Created
July 25, 2023 21:02
-
-
Save elias19r/8ce2018557e18bb410cce8f9d9b427a3 to your computer and use it in GitHub Desktop.
mbecop: Run rubocop only on modified files
This file contains 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
function mbecop() { | |
{ | |
git diff-tree -r --no-commit-id --name-only HEAD main; | |
git ls-files -m | |
} | xargs ls -1 2>/dev/null | grep '\.rb$' | xargs bundle exec rubocop --force-exclusion | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment