homebrew-cask/CONTRIBUTING.md

2.4 KiB

How To Contribute

👍🎉 First off, thanks for taking the time to contribute! 🎉👍

Updating a Cask

Notice an application that's out-of-date in Homebrew Cask? In most cases, it's very simple to update it. We have a command that will take care of updating the Cask file and submitting a pull request to us:

brew bump --open-pr <outdated_cask>

You can also follow the steps in Adding a Cask for more complicated changes.

Getting Set Up To Contribute

Follow the guide in How to open a Homebrew pull request.

Adding a Cask

Notice an application that's not in Homebrew Cask yet? Make sure it's not yet in Homebrew/cask-versions or Homebrew/core (can be searched with brew search). Mac App Store apps can't be installed via Homebrew Cask, but check out mas for an alternative.

With a bit of work, you can create a Cask for it. The document Adding A Cask will help you create, test, and submit a new Cask to us.

Style guide

Some style guidelines:

  • All Casks and code should be indented using two spaces (never tabs). When brew style contradicts this, style must be followed.
  • There should not be any extraneous comments - the only comments that should be used are the ones explicitly defined in the Cask Cookbook.
  • The stanza order and position of newlines is important to make things easier (See Stanza order).
  • Use string manipulations to improve the maintainability of your Cask (See version methods).
  • Test your cask using brew audit/style (See testing).
  • Make one Pull Request per Cask change.
  • Do not squash commits after updating a Pull Request.
  • Use descriptive commit messages - mention cask name and version/change (ie. transmission 2.82, google-chrome: update zap).