rubocop/rubocop · error · RuboCop::ValidationError
The `Layout/MultilineMethodCallIndentation` cop only accepts
Error message
The `Layout/MultilineMethodCallIndentation` cop only accepts an `IndentationWidth` configuration parameter when `EnforcedStyle` is `indented`.
What it means
Error "The `Layout/MultilineMethodCallIndentation` cop only accepts an `IndentationWidth` configuration parameter when `EnforcedStyle` is `indented`." thrown in rubocop/rubocop.
Source
Thrown at lib/rubocop/cop/layout/multiline_method_call_indentation.rb:60
# end
#
# # good
# myvariable = Thing
# .a
# .b
# .c
#
class MultilineMethodCallIndentation < Base # rubocop:disable Metrics/ClassLength
include ConfigurableEnforcedStyle
include Alignment
include MultilineExpressionIndentation
include RangeHelp
extend AutoCorrector
def validate_config
return unless style == :aligned && cop_config['IndentationWidth']
raise ValidationError,
'The `Layout/MultilineMethodCallIndentation` ' \
'cop only accepts an `IndentationWidth` ' \
'configuration parameter when ' \
'`EnforcedStyle` is `indented`.'
end
private
def find_base_receiver(node)
base_receiver = node
base_receiver = base_receiver.receiver while base_receiver.receiver
base_receiver
end
def find_pair_ancestor(node)
node.each_ancestor do |ancestor|
return ancestor if ancestor.pair_type?
break if grouped_expression?(ancestor) || inside_arg_list_parentheses?(node, ancestor)View on GitHub (pinned to ea712edf2b)
When it happens
Trigger: Thrown at lib/rubocop/cop/layout/multiline_method_call_indentation.rb:60 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of rubocop/rubocop@ea712edf2b (2026-08-21).
Data as JSON: /api/errors/e22ee1a59c9b8b6c.
Report an issue: GitHub.