-
-
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
Layout/EndAlignment should autocorrect #8321
Comments
If I try to autocorrect with the given example it does it but --- a/file.rb
+++ b/file.rb
@@ -49,5 +49,5 @@
Regexp.union(rspec_pattern_config.map(&Regexp.public_method(:new)))
else
DEFAULT_PATTERN_RE
- end
+ end
end |
Right, the inside is another cop's responsibility. The full story is that I added def rspec_pattern
@rspec_pattern ||= if rspec_pattern_config?
Regexp.union(rspec_pattern_config.map(&Regexp.public_method(:new)))
else
DEFAULT_PATTERN_RE
end
end RuboCop corrected the alignment of everything except the |
What's the previous and the autocorrected code @marcandre? I ran rubocop to autocorrect your example and got this: --- a/file.rb
+++ b/file.rb
@@ -49,5 +49,5 @@
Regexp.union(rspec_pattern_config.map(&Regexp.public_method(:new)))
else
DEFAULT_PATTERN_RE
- end
+ end
end In this case only the |
@marcandre Yes, there is an issue in the alignment of the 'END'. I would like to pick this issue. |
…ent, Lint/EmptyEnsure
I'm sorry I skipped over this @sebastian-palma, that was the only issue. Now fixed. |
I get "Layout/EndAlignment: end at 52, 10 is not aligned with if at 48, 29."
The cop should autocorrect it.
The text was updated successfully, but these errors were encountered: