-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Style/MultilineMemoization autocorrects to invalid ruby #4322
Closed
Labels
Comments
nikolai-b
added a commit
to nikolai-b/rubocop
that referenced
this issue
Apr 27, 2017
I'm looking into fixing this. class MyClass
def my_method
@my_method ||= begin
true ||
true ||
false
end
end
end Should the cop also fix the indentation of items in the expression, or is it ok to let other cops fix it? |
@ilansh: Basic indentation is generally handled by each individual cop's autocorrect. 🙂 |
dpostorivo
added a commit
to dpostorivo/rubocop
that referenced
this issue
Sep 7, 2017
11 tasks
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
Style/MultilineMemoization auto-corrects when the
(
are not on new lines by replacing them withbegin
Actual behavior
If
(
is not on its own line then a new line should be added.Steps to reproduce the problem
Autocorreting
becomes
RuboCop version
The text was updated successfully, but these errors were encountered: