brew/Library/Homebrew/.rubocop.yml

104 lines
2.1 KiB
YAML
Raw Normal View History

inherit_from:
- ../.rubocop.yml
AllCops:
Include:
2018-06-06 23:05:00 -04:00
- '**/*.rb'
- 'Library/Homebrew/.simplecov'
Exclude:
2018-01-07 15:40:42 +00:00
- 'bin/*'
2016-10-11 01:00:23 +02:00
- '**/Casks/**/*'
- '**/vendor/**/*'
Layout/MultilineMethodCallIndentation:
2016-10-23 14:44:14 +02:00
Exclude:
2017-02-12 17:26:34 +01:00
- '**/*_spec.rb'
2016-10-23 14:44:14 +02:00
2018-06-06 23:05:00 -04:00
# Gets false positives with our heredocs nested inside arrays
Layout/ClosingHeredocIndentation:
Enabled: false
# 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: true
2018-07-08 20:08:51 +02:00
Lint/UnusedMethodArgument:
AllowUnusedKeywordArguments: true
# TODO: try to bring down all metrics maximums
Metrics/AbcSize:
Max: 250
Metrics/BlockLength:
Max: 1250
Metrics/BlockNesting:
Max: 5
Metrics/ClassLength:
Max: 1226
Metrics/CyclomaticComplexity:
Max: 75
Metrics/LineLength:
# 124 is the goal as GitHub diff UI wraps beyond that
Max: 244
# ignore manpage comments
IgnoredPatterns: ['#: ']
Metrics/MethodLength:
Max: 195
2017-05-21 00:15:56 +02:00
Metrics/ModuleLength:
Max: 222
Metrics/PerceivedComplexity:
Max: 100
# we won't change backward compatible method names
Naming/MethodName:
Exclude:
- 'compat/**/*'
# we won't change backward compatible predicate names
Naming/PredicateName:
Exclude:
- 'compat/**/*'
NameWhitelist: is_32_bit?, is_64_bit?
2018-03-05 11:46:38 +00:00
# f meaning formulae is pretty standard
Naming/UncommunicativeMethodParamName:
Enabled: false
2018-06-06 23:34:19 -04:00
# Avoid false positives on modifiers used on symbols of methods
# See https://github.com/rubocop-hq/rubocop/issues/5953
2018-06-06 23:05:00 -04:00
Style/AccessModifierDeclarations:
Enabled: false
Style/BlockDelimiters:
Exclude:
- '**/*_spec.rb'
2017-10-03 10:49:58 +02:00
- '**/shared_examples/**/*.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
2018-01-07 15:40:42 +00:00
# so many of these in formulae but none in here
Style/TrailingBodyOnMethodDefinition:
Enabled: true