.rubocop.yml
AllCops:
TargetRubyVersion: 2.3
DisplayStyleGuide: true
Exclude:
- spec/**/*.rb
- test_rails_app/**/*.rb
Rails:
Enabled: true
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_first_parameter
SupportedStyles:
- with_first_parameter
- with_fixed_indentation
# Multi-line method chaining should be done with trailing dots.
Style/DotPosition:
EnforcedStyle: leading
SupportedStyles:
- leading
Style/Documentation:
Description: 'Document classes and non-namespace modules.'
Enabled: false
Exclude:
- 'spec/**/*'
- 'test/**/*'
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
SupportedStyles:
- comma
- consistent_comma
- no_comma
Style/TrailingCommaInArrayLiteral:
# If `comma`, the cop requires a comma after the last item in an array or
# hash, but only when each item is on its own line.
# If `consistent_comma`, the cop requires a comma after the last item of all
# non-empty array and hash literals.
EnforcedStyleForMultiline: comma
SupportedStyles:
- comma
- consistent_comma
- no_comma
Style/TrailingCommaInHashLiteral:
# If `comma`, the cop requires a comma after the last item in an array or
# hash, but only when each item is on its own line.
# If `consistent_comma`, the cop requires a comma after the last item of all
# non-empty array and hash literals.
EnforcedStyleForMultiline: comma
SupportedStyles:
- comma
- consistent_comma
- no_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