Line endings on Windows
lukebakken opened this issue · 0 comments
Thanks for the very useful project!
I opened the following pull request (which may or may not be accepted) to use erlfmt
on a new RabbitMQ project - rabbitmq/khepri#28
I have the following git settings related to line endings in my Win 10 dev environment:
[core]
autocrlf = true
eol = native
safecrlf = warn
This means that files in my clone of rabbitmq/khepri
have CRLF
endings, but LF
endings in the repo.
When I run rebar3 fmt
it converts all of the files to LF
endings, even if no other formatting needed to happen. In addition, rebar3 fmt --check
also thinks CRLF
endings indicate mis-formatted files (https://github.com/rabbitmq/khepri/runs/4632960535?check_suite_focus=true)
This isn't the end of the world, because I can force LF
endings via the .gitattributes
file -
https://github.com/rabbitmq/khepri/blob/lukebakken/erlfmt/.gitattributes
...but it would be nice if erlfmt
were forgiving when it comes to line endings, either by default or via configuration.
Merry Christmas 🎄