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
Maintaining
To publish a new release:
- update the version in
lib/rubocop/cask/version.rb - run
bundle exec rake buildto run tests and generate the changelog - commit the changes
- run
bundle exec rake release
License
rubocop-cask is MIT licensed. See the accompanying file for
the full text.