.rubocop.yml
AllCops:
TargetRubyVersion: 2.4
DisplayStyleGuide: true
Exclude:
- 'tmp/**/*'
- 'delfos.gemspec'
- 'vendor/**/*'
- 'fixtures/**/*'
- 'examples/**/*'
- 'db/**/*'
Rails:
Enabled: false
Metrics/BlockLength:
ExcludedMethods: ['describe', 'context', 'it']
Metrics/LineLength:
Max: 120
Layout/AlignParameters:
# Alignment of parameters in multi-line method calls.
#
# The `with_first_parameter` style aligns the following lines along the same
# column as the first parameter.
#
# method_call(a,
# b)
#
# The `with_fixed_indentation` style aligns the following lines with one
# level of indentation relative to the start of the line with the method call.
#
# method_call(a,
# b)
EnforcedStyle: with_fixed_indentation
SupportedStyles:
- with_first_parameter
- with_fixed_indentation
# Multi-line method chaining should be done with trailing dots.
Layout/DotPosition:
EnforcedStyle: trailing
SupportedStyles:
- leading
- trailing
Style/Documentation:
Description: 'Document classes and non-namespace modules.'
Enabled: false
Exclude:
- 'spec/**/*'
- 'test/**/*'
# ->(i) { ... } vs. lambda { |i| ... }
Style/LambdaCall:
EnforcedStyle: braces
SupportedStyles:
- call
- braces
# ["one", "two"] vs %w(one two), but also ["one", "another one"] vs. %w(...)
Style/SymbolArray:
EnforcedStyle: percent
SupportedStyles:
- percent
- brackets
Style/ModuleFunction:
Enabled: false
Style/TrailingCommaInArguments:
# If `comma`, the cop requires a comma after the last argument, but only for
# parenthesized method calls where each argument is on its own line.
# If `consistent_comma`, the cop requires a comma after the last argument,
# for all parenthesized method calls with arguments.
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
Style/StringLiterals:
EnforcedStyle: double_quotes
SupportedStyles:
- single_quotes
- double_quotes
# If true, strings which span multiple lines using \ for continuation must
# use the same type of quotes on each line.
ConsistentQuotesInMultiline: false
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
SupportedStyles:
- single_quotes
- double_quotes