Skip to content

Layout/DotPosition #6

@davidlibrera

Description

@davidlibrera

Currently rubocop validate that dot should be at the end of the row

# code
def method
  scope.a_scope.
    another_scope.
    last_scope
end

the thing I dislike is that when I remove the last method call the git commit will remote 2 lines and add one

# diff
   def method
     scope.a_scope.
-      another_scope.
-      last_scope
+     another_scope
   end

and I don't like it

If we used the leading dot (that currently is the default setting in rubocop) we would have

# code
def method
  scope.a_scope
    .another_scope
    .last_scope
end
# diff
   def method
     scope.a_scope
       .another_scope
-      .last_scope
   end

having a more clear commit body

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions