Skip to content
Snippets Groups Projects
Unverified Commit ec3e7b2a authored by Mike McQuaid's avatar Mike McQuaid
Browse files

.rubocop.yml: merge rubocop-cask configuration.

parent 491ceb6c
No related branches found
No related tags found
No related merge requests found
AllCops:
TargetRubyVersion: 2.3
Exclude:
- '**/Casks/**/*'
- '**/vendor/**/*'
DisplayCopNames: false
......@@ -15,6 +14,10 @@ FormulaAudit:
FormulaAuditStrict:
Enabled: true
# enable all cask audits
Cask:
Enabled: true
# disable all formulae strict audits by default
NewFormulaAudit:
Enabled: false
......@@ -39,6 +42,8 @@ Layout/CaseIndentation:
# this is a bit less "floaty"
Layout/EndAlignment:
EnforcedStyleAlignWith: start_of_line
Exclude:
- '**/Casks/**/*'
# enforce use of <<~EOS
Layout/IndentHeredoc:
......@@ -108,10 +113,14 @@ Metrics/LineLength:
Max: 170
# ignore manpage comments and long single-line strings
IgnoredPatterns: ['#: ', ' url "', ' mirror "', ' plist_options :']
Exclude:
- '**/Casks/**/*'
# dashes in filenames are typical
Naming/FileName:
Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/
Exclude:
- '**/Casks/**/*'
# implicitly allow EOS as we use it everywhere
Naming/HeredocDelimiterNaming:
......@@ -176,6 +185,7 @@ Style/HashSyntax:
- '**/cmd/**/*'
- '**/lib/**/*'
- '**/spec/**/*'
- '**/Casks/**/*'
# this doesn't make sense for wide lines below maximum line length
# https://github.com/rubocop-hq/rubocop/issues/6149
......@@ -206,10 +216,14 @@ Style/StderrPuts:
# ruby style guide favorite
Style/StringLiterals:
EnforcedStyle: double_quotes
Exclude:
- '**/Casks/**/*'
# consistency with above
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Exclude:
- '**/Casks/**/*'
# consistency helps readability and helps people who don't know Ruby
Style/StringMethods:
......@@ -222,6 +236,8 @@ Style/SymbolArray:
# make things a bit easier to read
Style/TernaryParentheses:
EnforcedStyle: require_parentheses_when_complex
Exclude:
- '**/Casks/**/*'
# messes with existing plist/caveats style
Style/TrailingBodyOnMethodDefinition:
......@@ -238,3 +254,32 @@ Style/TrailingCommaInHashLiteral:
# a bit confusing to non-Rubyists but useful for longer arrays
Style/WordArray:
MinSize: 4
Exclude:
- '**/Casks/**/*'
# exclude some styles for casks (for now)
# TODO: make Homebrew/brew, casks and formulae more consistent
Layout/ElseAlignment:
Exclude:
- '**/Casks/**/*'
Layout/IndentArray:
Exclude:
- '**/Casks/**/*'
Layout/IndentHash:
Exclude:
- '**/Casks/**/*'
Layout/IndentationWidth:
Exclude:
- '**/Casks/**/*'
Performance/StringReplacement:
Exclude:
- '**/Casks/**/*'
Style/EmptyElse:
Exclude:
- '**/Casks/**/*'
Style/PercentLiteralDelimiters:
Exclude:
- '**/Casks/**/*'
Style/RegexpLiteral:
Exclude:
- '**/Casks/**/*'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment