Cask-specific analysis for your Homebrew-Cask taps, as an extension to
RuboCop. Heavily inspired by rubocop-rspec
.
Just install the rubocop-cask
gem
gem install rubocop-cask
or if you use bundler put this in your Gemfile
gem 'rubocop-cask'
You need to tell RuboCop to load the Cask extension. There are three ways to do this:
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.
rubocop --require rubocop-cask
RuboCop::RakeTask.new do |task|
task.requires << 'rubocop-cask'
end
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
- 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.
To publish a new release:
- Update the version in
lib/rubocop/cask/version.rb
. - Run
bundle exec rake build
to run tests and generate the changelog. - Commit the changes.
- Create a new tag on GitHub.
rubocop-cask
is MIT licensed. See the accompanying file for
the full text.