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

EmptyLines cop does auto-correction. #624

Merged
merged 1 commit into from
Nov 12, 2013

Conversation

dblock
Copy link
Contributor

@dblock dblock commented Nov 9, 2013

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) when pulling a0de8239192680d1bb20e4c4789b1406ad68c3ff on dblock:autocorrect-empty-lines into 167b49c on bbatsov:master.

@jonas054
Copy link
Collaborator

jonas054 commented Nov 9, 2013

I think the problem is that you're looping over offences in autocorrect. The method will be called once per offence. Take a look at TrailingBlankLines where lines are removed in autocorrect.

@dblock
Copy link
Contributor Author

dblock commented Nov 10, 2013

@jonas054 right on, thanks! My code caused clobbering (remove on the same range was called twice) which caused the detection to try to highlight the issue, which caused it to raise an exception when being rendered, because it cannot render something that spans more than one line.

Now fixed, this is good to merge.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) when pulling 66b61c4 on dblock:autocorrect-empty-lines into 62a7059 on bbatsov:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) when pulling 66b61c4 on dblock:autocorrect-empty-lines into 62a7059 on bbatsov:master.

bbatsov added a commit that referenced this pull request Nov 12, 2013
`EmptyLines` cop does auto-correction.
@bbatsov bbatsov merged commit 31056d3 into rubocop:master Nov 12, 2013
@bbatsov
Copy link
Collaborator

bbatsov commented Nov 12, 2013

👍

@dblock dblock deleted the autocorrect-empty-lines branch December 4, 2013 21:22
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

Successfully merging this pull request may close these issues.

4 participants