Reevoocop
20% MonkeyPatch 80% YAML 100% Style
Installation
Add this line to your application's Gemfile:
gem 'reevoocop', require: false
And then execute:
$ bundle
Or install it yourself as:
$ gem install reevoocop
Usage
In a Rakefile
require 'reevoocop/rake_task'
ReevooCop::RakeTask.new(:reevoocop)
Or to only have it lint files after the specified commit:
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
Configuring / Contributing
- You can't configure this, thats the point.
- If you need to change our style guidelines, update the
lib/reevoocop.ymlfile and open a pull request. - If you have a good reason to break the guidelines, you can switch of the cop in question for the code in question, like this
- Please don't open a pull request unless you work at reevoo, if you don't but would like to look at our website