Last active
December 11, 2015 01:28
-
-
Save teeparham/a1df95db23d0e493255a to your computer and use it in GitHub Desktop.
Inspect all ruby files in the current commit with rubocop
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
| alias gdcop="git diff --name-only | grep '\.rb' | tr '\n' ' ' | sed 's/,$/\n/' | xargs rubocop" | |
| # $ git status | |
| # On branch master | |
| # Your branch is up-to-date with 'origin/master'. | |
| # Changes not staged for commit: | |
| # (use "git add <file>..." to update what will be committed) | |
| # (use "git checkout -- <file>..." to discard changes in working directory) | |
| # | |
| # modified: History.md | |
| # modified: lib/rgeo/geo_json.rb | |
| # modified: lib/rgeo/geo_json/coder.rb | |
| # | |
| # no changes added to commit (use "git add" and/or "git commit -a") | |
| # $ gdcop | |
| # Inspecting 2 files | |
| # ... | |
| # gdcop -a | |
| # autocorrects 2 files ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment