RuboCop Cask
Cask-specific analysis for your Homebrew-Cask taps, as an extension to
RuboCop. Heavily inspired by rubocop-rspec
.
Installation
Just install the rubocop-cask
gem
gem install rubocop-cask
or if you use bundler put this in your Gemfile
gem 'rubocop-cask'
Usage
You need to tell RuboCop to load the Cask extension. There are three ways to do this:
RuboCop configuration file
Put this into your .rubocop.yml
:
require: rubocop-cask
Now you can run rubocop
and it will automatically load the RuboCop Cask cops together with the standard cops.
Command line
rubocop --require rubocop-cask
Rake task
RuboCop::RakeTask.new do |task|
task.requires << 'rubocop-cask'
end
The Cops
All cops are located under lib/rubocop/cop/cask
, and contain examples/documentation.
In your .rubocop.yml
, you may treat the Cask cops just like any other cop. For example:
Cask/NoDslVersion:
Enabled: false
Contributing
- 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
For running the spec files, this project depends on RuboCop's spec helpers. This means that in order to run the specs locally, you need a (shallow) clone of the RuboCop repository:
git submodule update --init --depth 1 vendor/rubocop
License
rubocop-cask
is MIT licensed. See the accompanying file for
the full text.