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

Autocorrect issue - parentheses removed and methods combined #192

Closed
sethherr opened this issue Jul 29, 2020 · 4 comments
Closed

Autocorrect issue - parentheses removed and methods combined #192

sethherr opened this issue Jul 29, 2020 · 4 comments
Labels
rubocop bug 🚨 An apparent bug in RuboCop

Comments

@sethherr
Copy link

sethherr commented Jul 29, 2020

I just ran into an issue with autocorrect (for some ambiguous parentheses). It took this code:

entry.author do |author|
  author.name (blog.user.name)
end

And converted it to:

entry.author do |author|
  author.nameblog.user.name
end

...which doesn't work. It should have switched it to author.name(blog.user.name)

I'm not sure this is an issue with standard or if it should be addressed in rubocop

@searls
Copy link
Contributor

searls commented Aug 23, 2020

Yeah, this is definitely a thing. Seems to be this lint: https://docs.rubocop.org/rubocop/cops_lint.html#lintparenthesesasgroupedexpression

Probably interacting poorly with another rule we have enabled

@searls
Copy link
Contributor

searls commented Aug 23, 2020

Yes I believe this is a bug in Rubocop. Will file there shortly

@searls
Copy link
Contributor

searls commented Aug 23, 2020

Ok, filed! rubocop/rubocop#8572

@searls searls added the rubocop bug 🚨 An apparent bug in RuboCop label Aug 31, 2020
@jmkoni
Copy link
Contributor

jmkoni commented Sep 8, 2020

This should have been fixed with 0.90

@jmkoni jmkoni closed this as completed Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rubocop bug 🚨 An apparent bug in RuboCop
Projects
None yet
Development

No branches or pull requests

3 participants