Sha256: 5cd3c1ca74bc6f0df1ef4c1222210ddf54cae915b04053edaace36897a05f6fc
Contents?: true
Size: 1.04 KB
Versions: 6509
Compression:
Stored size: 1.04 KB
Contents
# frozen_string_literal: true module RuboCop module Cop module Layout # This cop checks for a line break before the first parameter in a # multi-line method parameter definition. # # @example # # # bad # def method(foo, bar, # baz) # do_something # end # # # good # def method( # foo, bar, # baz) # do_something # end # # # ignored # def method foo, # bar # do_something # end class FirstMethodParameterLineBreak < Cop include FirstElementLineBreak MSG = 'Add a line break before the first parameter of a ' \ 'multi-line method parameter list.'.freeze def on_def(node) check_method_line_break(node, node.arguments) end alias on_defs on_def def autocorrect(node) EmptyLineCorrector.insert_before(node) end end end end end
Version data entries
6,509 entries across 6,503 versions & 25 rubygems