Skip to content

v4 changed formatting conflicts with rubocop #174

Closed
@mscrivo

Description

@mscrivo

Hey Kevin,

Seems that formatting has changed in 4.0, causing conflicts with rubocop rules.

For example:

4.0 wants to change this:

module Migration
  Sequel.migration do
    down do
      DB.run(
        "
        SOME SQL STMT
      "
      )
    end
  end
end

to this:

module Migration
  Sequel.migration do
    down { DB.run("
        SOME SQL STMT
      ") }
  end
end

and rubocop is complaining:

C: [Correctable] Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.
      DB.run(" ...

another example with puts:

before:

  puts(
    '
      some string.
    '.gsub(/^\s+/, '')
  )

after:

  puts('
      some string.
    '.gsub(/^\s+/, ''))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions