Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout/DotPosition #6

Open
davidlibrera opened this issue Jun 14, 2019 · 0 comments
Open

Layout/DotPosition #6

davidlibrera opened this issue Jun 14, 2019 · 0 comments

Comments

@davidlibrera
Copy link
Collaborator

davidlibrera commented Jun 14, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant