brew/Library/Homebrew/.rubocop.yml

50 lines
1.0 KiB
YAML
Raw Normal View History

inherit_from:
- ../.rubocop.yml
- .rubocop_todo.yml
AllCops:
Include:
- '**/.simplecov'
Exclude:
- 'cask/**/*'
- '**/vendor/**/*'
# so many of these in formulae but none in here
Lint/AmbiguousRegexpLiteral:
Enabled: true
# `formula do` uses nested method definitions
Lint/NestedMethodDefinition:
Exclude:
- 'test/**/*'
# so many of these in formulae but none in here
Lint/ParenthesesAsGroupedExpression:
Enabled: false
Metrics/ModuleLength:
CountComments: false
Exclude:
- 'cask/lib/hbc/locations.rb'
- 'cask/lib/hbc/macos.rb'
- 'cask/lib/hbc/utils.rb'
# so many of these in formulae but none in here
Style/GuardClause:
Enabled: true
# hash-rockets preferred for formulae, a: 1 preferred elsewhere
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
# we won't change backward compatible method names
Style/MethodName:
Exclude:
- 'compat/**/*'
# we won't change backward compatible predicate names
Style/PredicateName:
Exclude:
- 'compat/**/*'
NameWhitelist: is_32_bit?, is_64_bit?