Skip to content

Requiring LF line separators isn't Windows-friendly #202

Closed
@bedla

Description

@bedla

Hi,
I found that when I run build of spring-javaformat (or any project that uses this tool) on Windows with autocrlf=false it fails on camparations between CRLF and LF.
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 uses autocrlf=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 to false 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 with core.autocrlf=false global Git configuration.
Am I right?
Thx,
Ivos

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions