<commit_before>**Note**: Before taking the time to craft a new cask, make sure it can be accepted by checking the [Rejected Casks FAQ document](https://github.com/caskroom/homebrew-cask/blob/master/doc/faq/rejected_casks.md).

## Adding a Cask

Making a new Cask is easy. Follow the directions in [Getting Set Up To Contribute](../../CONTRIBUTING.md#getting-set-up-to-contribute) to begin.

### Examples

Here’s a Cask for `shuttle` as an example. Note the comment above `url`, which is needed when [the url and homepage hostnames differ](../cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment)

```ruby
cask 'shuttle' do
  version '1.2.6'
  sha256 '7b54529cd00332e423839cf768b732ac6c42e17de9325d0a093764180deeb611'

  # github.com/fitztrev/shuttle was verified as official when first introduced to the cask
  url "https://github.com/fitztrev/shuttle/releases/download/v#{version}/Shuttle.zip"
  appcast 'https://github.com/fitztrev/shuttle/releases.atom',
          checkpoint: 'c3dea2ed479b3ebba7c56ace6040901795f6dc6be92f9ffc30cc808d31723f17'
  name 'Shuttle'
  homepage 'https://fitztrev.github.io/shuttle/'

  app 'Shuttle.app'

  zap trash: '~/.shuttle.json'
end
```

And here is one for `airstream`. Note that it has an unversioned download (the download `url` does not contain the version number, unlike the example above). It also suppresses the checksum with `sha256 :no_check` (necessary since the checksum will change when a new distribution is made available). This combination of `version :latest` and `sha256 :no_check` is currently the preferred mechanism when a versioned download URL is not available.

```ruby
cask 'airstream' do
  version :latest
  sha256 :no_check

  # amazonaws.com/airstream-clients was verified as official when first introduced to the cask
  url 'https://s3-us-west-2.amazonaws.com/airstream-clients/mac/airstream-mac.dmg'
  name 'AirStream'
  homepage 'http://airstream.io/download/'

  app 'AirStream.app'

  caveats do
    depends_on_java('6')
  end
end
```

Here is a last example for `airdisplay`, which uses a `pkg` installer to install the application instead of a stand-alone application bundle (`.app`). Note the [`uninstall pkgutil` stanza](../cask_language_reference/stanzas/uninstall.md#uninstall-key-pkgutil), which is needed to uninstall all files which were installed using the installer.
<commit_msg>adding_a_cask.md: change latest/no_check example to advancedcolors (#42028)<commit_after>**Note**: Before taking the time to craft a new cask, make sure it can be accepted by checking the [Rejected Casks FAQ document](https://github.com/caskroom/homebrew-cask/blob/master/doc/faq/rejected_casks.md).

## Adding a Cask

Making a new Cask is easy. Follow the directions in [Getting Set Up To Contribute](../../CONTRIBUTING.md#getting-set-up-to-contribute) to begin.

### Examples

Here’s a Cask for `shuttle` as an example. Note the comment above `url`, which is needed when [the url and homepage hostnames differ](../cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment)

```ruby
cask 'shuttle' do
  version '1.2.6'
  sha256 '7b54529cd00332e423839cf768b732ac6c42e17de9325d0a093764180deeb611'

  # github.com/fitztrev/shuttle was verified as official when first introduced to the cask
  url "https://github.com/fitztrev/shuttle/releases/download/v#{version}/Shuttle.zip"
  appcast 'https://github.com/fitztrev/shuttle/releases.atom',
          checkpoint: 'c3dea2ed479b3ebba7c56ace6040901795f6dc6be92f9ffc30cc808d31723f17'
  name 'Shuttle'
  homepage 'https://fitztrev.github.io/shuttle/'

  app 'Shuttle.app'

  zap trash: '~/.shuttle.json'
end
```

And here is one for `advancedcolors`. Note that it has an unversioned download (the download `url` does not contain the version number, unlike the example above). It also suppresses the checksum with `sha256 :no_check` (necessary since the checksum will change when a new distribution is made available). This combination of `version :latest` and `sha256 :no_check` is currently the preferred mechanism when a versioned download URL is not available.

```ruby
cask 'advancedcolors' do
  version :latest
  sha256 :no_check

  url 'http://advancedcolors.com/AdvancedColors.zip'
  name 'Advanced Colors'
  homepage 'http://advancedcolors.com/'

  app 'AdvancedColors.app'
end
```

Here is a last example for `airdisplay`, which uses a `pkg` installer to install the application instead of a stand-alone application bundle (`.app`). Note the [`uninstall pkgutil` stanza](../cask_language_reference/stanzas/uninstall.md#uninstall-key-pkgutil), which is needed to uninstall all files which were installed using the installer.

{'fraction_non_alphanumeric': 0.10093497662558436, 'fraction_numerical': 0.042498937526561836, 'mean_word_length': 4.747252747252747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2208730', 'n_tokens_mistral': 1674, 'n_tokens_neox': 1499, 'n_words': 478}