-
-
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
0.61.0 release breaks Layout/RescueEnsureAlignment cop for indented code #6550
Labels
Comments
"Works" if I remove the indentation: # frozen_string_literal: true
def self.parse(xml)
io = new
attributes.each do |key, _val|
value = begin
xml.nodes.find { |node| node.value == key.to_s }&.nodes.to_a[0].to_i
rescue StandardError
nil
end
io.attributes[key] = value if value
end
io
end
|
Kjarrigan
changed the title
An error occurred while Layout/RescueEnsureAlignment cop
0.61.0 release breaks Layout/RescueEnsureAlignment cop for indented code
Dec 5, 2018
Another example from my codebase
Where the cf.rake file consists of:
|
I have encountered the same issue. Indentation exactly the same as OP.
|
donoghuc
added a commit
to donoghuc/bolt
that referenced
this issue
Dec 5, 2018
The `0.61.0` Rubocop release has a bug tracked with rubocop/rubocop#6550. Pin to `0.60.0` until resolved.
Thanks for the report! Looks like we're missing some test cases for this cop. I will have a look at this. Minimum reproducible example: foo =
begin
bar
rescue BazError
qux
end |
Drenmi
added a commit
to Drenmi/rubocop
that referenced
this issue
Dec 6, 2018
… on assigned begin-end We were missing some test cases for this cop, and accidentally introduced a regression in rubocop#6437. This change adds a relevant test case and fixes the issue.
FYI, this was fixed in version 0.61.1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
Worked with 0.60.0
Actual behavior
Breaks with 0.61.0
Steps to reproduce the problem
Backtrace:
RuboCop version
The text was updated successfully, but these errors were encountered: