Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jamescdavis
Copy link
Contributor

@jamescdavis jamescdavis commented Apr 30, 2020

The Writefile util will append a newline to the end of the last line in the buffer, even if it is noeol and nofixeol is set. This breaks linting for noeol (temp file will always have eol). This PR fixes the issue by calling writefile with the binary flag when the buffer is noeol and nofixeol is set, thus preserving the noeol.

@jamescdavis jamescdavis force-pushed the dont_append_newline_when_noeol branch from 5cc3460 to 15d590e Compare April 30, 2020 19:00
@jamescdavis jamescdavis changed the title don't append a newline when buffer is noeol don't append a newline when buffer is noeol and nofixeol is set Apr 30, 2020
@jamescdavis jamescdavis changed the title don't append a newline when buffer is noeol and nofixeol is set don't append a newline to temp file when buffer is noeol and nofixeol is set Apr 30, 2020
@stale
Copy link

stale bot commented Aug 13, 2020

This pull request has been automatically marked as stale because it has not been updated recently. Make sure to write tests and document your changes. See :help ale-dev for information on writing tests.
If your pull request is good to merge, bother w0rp or another maintainer again, and get them to merge it.

@stale stale bot added the stale PRs/Issues no longer valid label Aug 13, 2020
@jamescdavis
Copy link
Contributor Author

jamescdavis commented Aug 13, 2020

@w0rp, @hsanson, stale bot says to bother you 😉
Let me know if you need more context!

@stale stale bot removed the stale PRs/Issues no longer valid label Aug 13, 2020
@w0rp w0rp merged commit 2b2403a into dense-analysis:master Aug 13, 2020
@w0rp
Copy link
Member

w0rp commented Aug 13, 2020

Nice addition. Cheers! 🍻

@jamescdavis jamescdavis deleted the dont_append_newline_when_noeol branch August 17, 2020 17:50
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