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
Running cargo test on windows fails when autocrlf is set in git #617
Comments
Anyone developing rustfmt on windows successfully or have any comment on how to resolve this? EDIT: Setting |
With 7809e3b merged + using the Native newline configuration option One solution might be to override the global settings using a .gitattributes file to make sure that tests that are sensitive to line endings are run consistently. |
Hi ! Is this still an issue ? |
Today some tests are still failing with CRLF newline. Mostly because many rustfmt codes are assuming the newline is a single LF character. We should decide which layer to convert CRLFs into LF. I think we should not depend on git checkout-time settings. rustfmt can be used in the both LF env and CRLF env in real world. We must accept CRLF input file, then make sure to convert it to LF at some layer, then pass it to rustfmt submodules. |
Still looks like a problem. The symptom one sees at the moment is described in #1318 |
Tried running
cargo test
in windows and more or less every test is failing which leads me to guess it is due to git replacing line endings. Couldn't find any information on how to deal with this so opening an issue.The text was updated successfully, but these errors were encountered: