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: Rules SpaceAfterControlKeyword and ParenthesesAroundCondition clash #794

Closed
fh opened this issue Feb 4, 2014 · 1 comment
Closed

Comments

@fh
Copy link

fh commented Feb 4, 2014

Scenario: I am using rubocop 0.18.1, and using auto-correct breaks the code.

The line in question is https://github.com/easybiblabs/haproxyctl/blob/82100048d3f84e5c4d14f664e056c3e7808a4f35/rhapr/lib/rhapr/interface.rb#L108 - the result of autocorrect is:

       output = []
-      output << read(socket) until(sock.eof?)
+      output << read(socket) unti lsock.eof?
     end

Seems like the space has been misplaced.

The two rules colliding here appear to be SpaceAfterControlKeyword and ParenthesesAroundCondition - when I disable ParenthesesAroundCondition initially, have everything auto-corrected and apply it afterwards, the code is fine.

I also tried the same scenario using the current master version, without any difference.

@bbatsov
Copy link
Collaborator

bbatsov commented Feb 4, 2014

Ops. Thought I had this fixed, but I guess I didn't. Will give it another shot soon.

@bbatsov bbatsov closed this as completed in 7e3e4c7 Feb 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants