Created
August 17, 2016 05:55
-
-
Save cemeng/53c522241129f932bb6e129463de4d05 to your computer and use it in GitHub Desktop.
Run rubocop on files that changed between 2 revisions
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
unless (ARGV[0] && ARGV[1]) | |
puts "Please specify base revision and end revision, eg: rubocop-diff.rb HEAD 8234531" | |
exit | |
end | |
files = `git diff --name-only #{ARGV[0]} #{ARGV[1]}`.split("\n").join(" ") | |
puts `rubocop #{files}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment