Skip to content
Snippets Groups Projects
.rubocop_cask.yml 1.96 KiB
Newer Older
Markus Reiter's avatar
Markus Reiter committed
inherit_from: ./.rubocop_shared.yml

Cask/HomepageMatchesUrl:
  Description: 'Ensure that the homepage and url match, otherwise add a comment. More info at https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment'
  Enabled: true
  Exclude:
  - '**/test/support/fixtures/cask/Casks/**/*.rb'
Markus Reiter's avatar
Markus Reiter committed

Cask/HomepageUrlTrailingSlash:
  Description: 'Ensure that the homepage url has a slash after the domain name.'
  Enabled: true

Cask/NoDslVersion:
  Description: 'Do not use the deprecated DSL version syntax in your cask header.'
  Enabled: true

Cask/StanzaGrouping:
  Description: 'Ensure that cask stanzas are grouped correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order'
  Enabled: true

Cask/StanzaOrder:
  Description: 'Ensure that cask stanzas are sorted correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order'
  Enabled: true

Layout/HashAlignment:
Markus Reiter's avatar
Markus Reiter committed
  EnforcedHashRocketStyle: table
  EnforcedColonStyle: table

Layout/FirstArrayElementIndentation:
Markus Reiter's avatar
Markus Reiter committed
  EnforcedStyle: align_brackets

Layout/FirstHashElementIndentation:
Markus Reiter's avatar
Markus Reiter committed
  EnforcedStyle: align_braces

# Casks often contain long URLs and file paths.
Layout/LineLength:
Markus Reiter's avatar
Markus Reiter committed
  Enabled: false

# Casks don't need documentation.
Markus Reiter's avatar
Markus Reiter committed
Style/Documentation:
  Enabled: false

# These would only be distracting in casks.
Markus Reiter's avatar
Markus Reiter committed
Style/FrozenStringLiteralComment:
  EnforcedStyle: never
# Don't use hash rockets.
Markus Reiter's avatar
Markus Reiter committed
Style/HashSyntax:
  EnforcedStyle: ruby19_no_mixed_keys

# This is more readable when the regex contains slashes.
Markus Reiter's avatar
Markus Reiter committed
Style/RegexpLiteral:
  EnforcedStyle: percent_r

# Use consistent style for all arrays.
Style/WordArray:
Markus Reiter's avatar
Markus Reiter committed
  EnforcedStyle: brackets

# This makes multi-line arrays more readable and alignable.
Layout/FirstArrayElementLineBreak:
  Enabled: true
# This makes multi-line hashes more readable and alignable.
Layout/FirstHashElementLineBreak:
  Enabled: true