.rubocop.yml: merge rubocop-cask configuration.

This commit is contained in:
Mike McQuaid 2018-11-07 15:21:33 +00:00
parent 491ceb6c4c
commit ec3e7b2ae5
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -1,7 +1,6 @@
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/**/*'