Skip to content

Remove lf from NewlineAtEndOfFileCheck #227

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

Closed
wants to merge 1 commit into from

Conversation

artembilan
Copy link
Member

Different OSs may check out files with different line separators.
So, to better support other development environments it would be great to just require any end of file, not just Linux-specific.

Different OSs may check out files with different line separators.
So, to better support other development environments it would be great to just require any end of file, not just Linux-specific.
@spencergibb
Copy link
Member

Not sure about this one. Are you the one having the issue?

@artembilan
Copy link
Member Author

I am, Spencer. I develop on Windows and my Git client checks out files with crlf, so when I try to build Spring Cloud projects, the Checkstyle fails for me that it expects only lf.
It worked in the past because they really checked for end of line, which suited to crlf combination with just that lf config.
But now it fails because the rule has been tightened a little bit.

See similar config in SF: https://github.com/spring-projects/spring-framework/blob/main/src/checkstyle/checkstyle.xml#L16.
The respective change on their side: spring-projects/spring-framework@2feedb9.

We do the same in Spring Integration, Spring AMQP, Spring for Apache Kafka.

See also this for more justifications: spring-io/spring-javaformat#202

@spencergibb
Copy link
Member

Thanks for the justifications.

@spencergibb spencergibb self-assigned this Feb 2, 2022
@spencergibb spencergibb added this to the 3.1.1 milestone Feb 2, 2022
@spencergibb
Copy link
Member

Cherry picked to 3.1.x and merged forward via 711fbce

@spencergibb spencergibb closed this Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants