-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-30653][INFRA][SQL] EOL character enforcement for java/scala/xml/py/R files #27365
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
[SPARK-30653][INFRA][SQL] EOL character enforcement for java/scala/xml/py/R files #27365
Conversation
I think it's ideal to define the rules in |
If it's just a few files, OK. I think it's also fine to have git enforce it. Is there any downside to that? |
Test build #117425 has finished for PR 27365 at commit
|
@HeartSaVioR . When I follow the direction in the PR description at the master branch, the result is different. Did I miss something?
|
@dongjoon-hyun |
I don't think there's outstanding downside, as if it does have some considerable downsides someone should have been complained. Only 3 files were CR/LF and others have been LF. (cmd/bat files are enforced to have CR/LF as EOL, as they're only used in Windows OS.) |
Test build #117430 has finished for PR 27365 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM. Merged to master.
Thank you, @HeartSaVioR and @srowen .
Thanks all for reviewing amd merging! Thanks again @dongjoon-hyun to deal with filing JIRA and connecting this. |
What changes were proposed in this pull request?
This patch converts CR/LF into LF in 3 source files, which most files are only using LF. This patch also add rules to enforce EOL as LF for all java, scala, xml, py, R files.
Why are the changes needed?
The majority of source code files are using LF and only three files are CR/LF. While using IDE would let us don't bother with the difference, it still has a chance to make unnecessary diff if the file is modified with the editor which doesn't handle it automatically.
Does this PR introduce any user-facing change?
No
How was this patch tested?
(Please note you'll need to type CTRL+V -> CTRL+M in bash shell to get
^M
because it's representing CR/LF, not a combination of^
andM
.)Before the patch, the result is:
and after the patch, the result is None.
And git shows WARNING message if EOL of any of source files in given types are modified to CR/LF, like below: