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/IndentationWidth is broken #112
Comments
This appears to be a rubocop bug, but I can only repro it for empty methods, which makes it seem lower priority. This passes: class Foo
def a
nil
rescue
ensure
a
end
end |
I don’t know if this is the same thing, but when I try and make this indent "correctly" feed.entry(event,
id: "urn:uuid:#{event["id"]}",
url: url,
published: Time.parse(event["createdAt"]),
updated: Time.parse(event["createdAt"])) do |entry|
entry.title(event["tag"].titleize)
entry.author do |author|
author.name "Citus Cloud"
end
# … gets changed to feed.entry(event,
id: "urn:uuid:#{event["id"]}",
url: url,
published: Time.parse(event["createdAt"]),
updated: Time.parse(event["createdAt"])) do |entry|
entry.title(event["tag"].titleize)
entry.author do |author|
author.name "Citus Cloud"
end
# … This is on v 0.1.0 |
Well, that sure seems bad. @will would you be willing or able to try digging into this? |
This is as far as I think I can get: It seems like it depends on where the last So if you have a.method("a",
id: 2,
ok: 3) do |thing|
thing.ok
thing.other do |a|
a.foo
end
end and move that last a.method("a",
id: 2,
ok: 3) do |thing|
thing.ok
thing.other do |a|
a.foo
end
end This at least gives me a fix for this, and at most maybe means it’s not a bug at all and this is how it should be? I really don’t know. |
I was going through old issues and checked the state of this one. I put the original code in a file called test.rb:
and it now fails with this glorious infinite loop.
@koic have you seen this particular collision before? |
@jmkoni I opened rubocop/rubocop#9619 to fix the infinite loop. |
I overlooked the mention 💦 @dvandersluis Thank you for working on this! |
@dvandersluis @koic thank you to you both :) |
Should be part of 1.05 |
this fails with:
The text was updated successfully, but these errors were encountered: