-
Notifications
You must be signed in to change notification settings - Fork 7
trim_trailing_whitespace togehter with insert_final_newline does not work
#136
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
base: main
Are you sure you want to change the base?
Conversation
In this situation only the trim is performed but the final newline is not added.
|
@BaumiCoder thanks for the test, now I see what you expect. The question is how should |
To make the overall topic more clearly
|
You are right, there is no default of (A common scenario, where you not use EditorConfig to handle the EOL characters, is to handle them with git. Every developer has the files with the native EOL character on their machine and the central repository has LF.) |
|
I have filed a clarification issue editorconfig/editorconfig#570 so that we keep the behavior consistent over various agents interpreting |
|
@BaumiCoder I wonder why you do not set |
|
Currently, I have no active Java project, but in general using The reason is that git handles EOL already. The remote repository contains all files with LF and locally this is changed to platform specific EOL. To make sure nobody uses another git setting for this when working with your repository, you can add If you want to use |
If
trim_trailing_whitespaceandinsert_final_newlineare true andend_of_lineis not set,the trailing white spaces are removed, but no final newline is added.
This Pull Request currently only contains a failing tests to show this issues, which I reported in ec4j/editorconfig-maven-plugin#139.