-
Notifications
You must be signed in to change notification settings - Fork 114
Requiring LF line separators isn't Windows-friendly #202
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
Comments
Hi, when authors of spring-javaformat will clarify how to use formatter (see spring-io/spring-javaformat#202) on windows it would be nice to have this clarified in README. What do you think? Thx Ivos
From what I have seen, it won’t just be the formatter that will have problems with line endings on Windows if you use |
I have Anyways what I have found is, when sources are checked out with |
We've just hit a problem similar to this when upgrading the Spring Initializr project to Checkstyle 8.32. Spring Java Format currently requires
As mentioned above, we use Checkstyle defaults to |
I've dropped the attribute so the default of |
Update checkstyle rules so that the `NewlineAtEndOfFile` check no longer enforces only LF line separators. The default now accepts LF, CR or CRLF. Closes gh-202
Hi,
I found that when I run build of
spring-javaformat
(or any project that uses this tool) on Windows withautocrlf=false
it fails on camparations betweenCRLF
andLF
.I think (from my experiment when I was preparing PR) that pass
lineSeparator
parametr to formatter is easy but what is hard is how to detect eg. from Maven that user is on Windows and usesautocrlf=false
.There is also
line.separator
system property, but is hard to assign from IDEA/Maven.It seems that how formatter and
autocrlf
works it is not possible to set it tofalse
and make it work on Windows. This means that projects (eg. spring-cloud-sleuth) that use this formatter won't work correctly when user clones repository withcore.autocrlf=false
global Git configuration.Am I right?
Thx,
Ivos
The text was updated successfully, but these errors were encountered: