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
Update: no-multiple-empty-lines fixer (fixes #6225) #6226
Conversation
LGTM |
By analyzing the blame information on this pull request, we identified @vitorbal, @gcochard and @jaredsohn to be potential reviewers |
You should add tests for windows line endings: |
Agreed. @RRMoelker can you add some test with Windows line endings? |
I will try to add support for the Windows line endings this weekend. |
Adding "do not merge" until Windows line ending tests come in. |
LGTM |
Windows line endings were not being fixed correctly. Nice catch. The problem is that the SourceCode.lines variable contains lines without the newline character(s). This workaround works. Though at it's core translating between source code position and ranges is just not complete enough to make great fixers at the moment. |
LGTM |
@nzakas @platinumazure Windows line ending support and tests added. |
Lgtm. Thanks @RRMoelker ! |
Oops, one last thing: can you update the documentation? There are two places to update:
|
@RRMoelker quick ping to update documentation. |
@ilyavolodin I will update the documentation this weekend. |
Awesome! Thanks! |
LGTM |
LGTM. Thanks @RRMoelker |
Multiple empty lines rule fixer. Removes empty lines at beginning, middle or end of file. An array of lines is created along with an array of range starts. This is required to define the deletion ranges from line indices.