brew/Library/.rubocop.yml

163 lines
3.0 KiB
YAML
Raw Normal View History

AllCops:
TargetRubyVersion: 2.0
2016-10-11 01:00:23 +02:00
Exclude:
- '**/Casks/**/*'
2016-09-18 14:27:09 +01:00
Metrics/AbcSize:
Enabled: false
2016-09-25 02:41:14 +02:00
2016-09-18 14:27:09 +01:00
Metrics/ClassLength:
Enabled: false
2016-09-25 02:41:14 +02:00
Metrics/CyclomaticComplexity:
2016-09-18 14:27:09 +01:00
Enabled: false
Metrics/LineLength:
Enabled: false
2016-09-25 02:41:14 +02:00
Metrics/MethodLength:
Enabled: false
Metrics/ModuleLength:
CountComments: false
Metrics/PerceivedComplexity:
2016-09-18 14:27:09 +01:00
Enabled: false
# favor parens-less DSL-style arguments
Lint/AmbiguousOperator:
Enabled: false
2016-09-25 02:41:14 +02:00
2016-09-18 14:27:09 +01:00
Lint/AmbiguousRegexpLiteral:
Enabled: false
2016-09-25 02:41:14 +02:00
2016-09-18 14:27:09 +01:00
Lint/AssignmentInCondition:
Enabled: false
2016-09-25 02:41:14 +02:00
Lint/EndAlignment:
AlignWith: variable
2016-09-18 14:27:09 +01:00
Lint/ParenthesesAsGroupedExpression:
Enabled: false
2016-09-25 02:41:14 +02:00
Style/Alias:
EnforcedStyle: prefer_alias
Style/AlignHash:
Enabled: false
# `system` is a special case and aligns on second argument
Style/AlignParameters:
Enabled: false
Style/BarePercentLiterals:
EnforcedStyle: percent_q
Style/BlockDelimiters:
EnforcedStyle: line_count_based
2016-09-25 02:41:14 +02:00
Style/CaseIndentation:
IndentWhenRelativeTo: end
Style/ClassAndModuleChildren:
EnforcedStyle: nested
# percent-x is allowed for multiline
Style/CommandLiteral:
EnforcedStyle: mixed
# our current conditional style is established, clear and
# requiring users to change that now would be confusing.
Style/ConditionalAssignment:
Enabled: false
Style/Documentation:
Enabled: false
2016-09-18 14:27:09 +01:00
Style/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
2016-09-25 02:41:14 +02:00
# dashes in filenames are typical
Style/FileName:
Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/
Style/GuardClause:
Enabled: false
# depends_on a: :b looks weird in formulae.
Style/HashSyntax:
EnforcedStyle: hash_rockets
Exclude:
- '**/bin/**/*'
- '**/cmd/**/*'
- '**/lib/**/*'
- '**/spec/**/*'
# disabled until it respects line length
Style/IfUnlessModifier:
Enabled: false
2016-09-25 02:41:14 +02:00
Style/IndentArray:
EnforcedStyle: special_inside_parentheses
# only for numbers >= 1_000_000
Style/NumericLiterals:
MinDigits: 7
# zero-prefixed octal literals are just too widely used (and mostly understood)
Style/NumericLiteralPrefix:
EnforcedOctalStyle: zero_only
2016-09-18 14:27:09 +01:00
# consistency and readability when faced with string interpolation
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%': '()'
'%i': '()'
'%q': '()'
'%Q': '()'
'%r': '{}'
'%s': '()'
'%w': '[]'
'%W': '[]'
'%x': '()'
2016-09-25 02:41:14 +02:00
# we prefer Perl-style regex back references
Style/PerlBackrefs:
Enabled: false
Style/RaiseArgs:
EnforcedStyle: exploded
# paths abound, easy escape
Style/RegexpLiteral:
EnforcedStyle: slashes
2016-09-18 14:27:09 +01:00
# conflicts with DSL-style path concatenation with `/`
Style/SpaceAroundOperators:
Enabled: false
# not a problem for typical shell users
Style/SpecialGlobalVars:
Enabled: false
2016-09-25 02:41:14 +02:00
# ruby style guide favorite
Style/StringLiterals:
EnforcedStyle: double_quotes
2016-09-18 14:27:09 +01:00
2016-09-25 02:41:14 +02:00
# consistency with above
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
2016-09-20 21:13:04 +02:00
Style/TernaryParentheses:
Enabled: false
2016-09-18 14:27:09 +01:00
# makes diffs nicer
Style/TrailingCommaInLiteral:
EnforcedStyleForMultiline: comma
2016-09-25 02:41:14 +02:00
Style/VariableNumber:
Enabled: false
2016-09-18 14:27:09 +01:00
2016-09-25 02:41:14 +02:00
Style/WordArray:
Enabled: false