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

Line endings on Windows #328

Open
lukebakken opened this issue Dec 25, 2021 · 0 comments
Open

Line endings on Windows #328

lukebakken opened this issue Dec 25, 2021 · 0 comments

Comments

@lukebakken
Copy link

lukebakken commented Dec 25, 2021

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 🎄

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

No branches or pull requests

1 participant