Just install the
gem install rubocop-decko
or if you use bundler put this in your
You need to tell RuboCop to load the Decko extension. There are three ways to do this:
RuboCop configuration file
Put this into your
Now you can run
rubocop and it will automatically load the RuboCop Decko cops together with the standard cops.
rubocop --require rubocop-decko
::RakeTask.new do |task| task.requires << 'rubocop-decko' end
All cops are located under
lib/rubocop/cop/decko, and contain examples/documentation.
.rubocop.yml, you may treat the Decko cops just like any other cop. For example:
Decko/ViewLength: Description: Avoid views longer than 15 lines of code. Enabled: true CountComments: false Max: 15
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request
rubocop-cask is MIT licensed. See the accompanying file for
the full text.