πŸš“ Code-Style Checking for Casks
Ruby Shell
Clone or download
Latest commit 625e981 Jun 20, 2018

README.md

RuboCop Cask

Gem Version Build Status Test Coverage Maintainability

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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Maintaining

To publish a new release:

  1. update the version in lib/rubocop/cask/version.rb
  2. run bundle exec rake build to run tests and generate the changelog
  3. commit the changes
  4. run bundle exec rake release

License

rubocop-cask is MIT licensed. See the accompanying file for the full text.