-
Notifications
You must be signed in to change notification settings - Fork 464
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
EclipseCommonTests are no longer sensitive to line-ending problems. #300
Conversation
Btw @simschla, with this merged, |
@nedtwigg I doubt that this is the best fix. IIRC, formatter steps are meant to guarantee that their outputs have Unix line endings, however this test now liberally accepts both Unix and Windows line endings. How about changing |
Nope. They are guaranteed that their inputs will have unix line endings. It is suggested that their outputs have unix line endings, but we don't take their word for it, and we always convert them to unix ourselves no matter what. There are quite a few steps that misbehave - easier to put this burden on the infrastructure rather than the step themselves. spotless/lib/src/main/java/com/diffplug/spotless/Formatter.java Lines 236 to 237 in a2fe993
|
Also, this is how our existing test harnessing works: spotless/testlib/src/main/java/com/diffplug/spotless/StepHarness.java Lines 36 to 41 in a2fe993
|
Oh, I'd completely forgotten that I don't have an IDE in front of me ATM to check, but I'm curious to know why |
@nedtwigg Thanks for the quick fix of my mistake. |
It's not a mistake :) There's no need for |
With "mistake", I was referring to the error in the test. |
FormatterStep are supposed to return unix line endings, but
Formatter
silently corrects for the case that they don't. To keep the windows build durable, we can resolve #298 by just making the tests ignore line ending problems.