README.md in reevoocop-0.0.3 vs README.md in reevoocop-0.0.4

- old
+ new

@@ -24,9 +24,22 @@ ```ruby require 'reevoocop/rake_task' ReevooCop::RakeTask.new(:reevoocop) ``` +Or to only have it lint files after the specified commit: + +```ruby +task :reevoocop do + exit 27 unless system("reevoocop #{files_that_changed_since_t_minus_0}") +end + +def files_that_changed_since_t_minus_0 + `git diff-tree --no-commit-id --name-only -r 19c297ff4a91b47c9af735a935c72ea5a2f05791 HEAD` + .split("\n").select { |f| f.match(/(rb\z)/) && File.exist?(f) }.join(' ') +end +``` + In your shell ``` $ reevoocop ```