antham/ghokin

Keep newline characters

gjuric opened this issue · 5 comments

Is it possible to add a flag that would make the formatter not strip newline characters from the end of the file?

Hi,
so you would like to propose a flag to strip everything (space, tab, new line and so on..) and adding a new extra line at the end of the file ?

The problem that I am having is that I use Editorconfig where I specify that all of the files have to have a final newline at the end of the file.

When I run ghokin it strips the final newline. Maybe the tool could check if there is a final newline or not and not change it, then no flag would be required.

It's a bug, I didn't pay attention to this, I'm going to fix it.

@gjuric can you tell me if it's solved the problem for you ?

Works! Thank you.