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

Fix EmptyLinesAroundBody so it doesn't report blank lines. #748

Merged
merged 1 commit into from
Jan 20, 2014

Conversation

jonas054
Copy link
Collaborator

This resolves a conflict ("clobbering") between EmptyLinesAroundBody and TrailingWhitespace. An extra blank line containing whitespace would cause them to try to remove the same characters in --auto-correct. The solution is to divide the offences between them. EmptyLinesAroundBody doesn't report offences for lines containing spaces now.

That is, lines with only space. The TrailingSpace cop must do its job first. Then we can deal with the extra empty line in EmptyLinesAroundBody. Otherwise auto-correction doesn't work.
bbatsov added a commit that referenced this pull request Jan 20, 2014
Fix EmptyLinesAroundBody so it doesn't report blank lines.
@bbatsov bbatsov merged commit c419de3 into rubocop:master Jan 20, 2014
@bbatsov
Copy link
Collaborator

bbatsov commented Jan 20, 2014

👍

@jonas054 jonas054 deleted the fix_empty_lines_around_body branch January 21, 2014 09:24
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.

2 participants