RuboCop Decko
Wagn-specific analysis for your Wagn deck, as an extension to
RuboCop. Heavily inspired by rubocop-rspec and rubocop-cask.
Installation
Just install the rubocop-decko gem
gem install rubocop-deckoor if you use bundler put this in your Gemfile
gem 'rubocop-decko'
Usage
You need to tell RuboCop to load the Decko extension. There are three ways to do this:
RuboCop configuration file
Put this into your .rubocop.yml:
require: rubocop-decko
Now you can run rubocop and it will automatically load the RuboCop Decko cops together with the standard cops.
Command line
rubocop --require rubocop-deckoRake task
RuboCop::RakeTask.new do |task|
task.requires << 'rubocop-decko'
endThe Cops
All cops are located under lib/rubocop/cop/decko, and contain examples/documentation.
In your .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: 15Contributing
- 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
License
rubocop-cask is MIT licensed. See the accompanying file for
the full text.