-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-1304: [Java] Fix Indentation, WhitespaceAround and EmptyLineSeparator checkstyle warnings in Java #930
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
Conversation
65d2ca2 to
5f46bbd
Compare
|
This is auto formatted with intellij + google_checks.xml. I manually eyeballed the changes and it looks good. @wesm do you know someone that can help me review this change? |
|
I also reverted all the changes to templates/*.java because intellij auto format doesn't work well with those. I need to fix them manually or use some other tool. Consider that this is a big PR that changes a lot of files, I think it's easier if we try to merge this one and address templates as follow up. |
|
Are these changes in line with the checkstyle checks? I seem to recall a prior reformat patch, and I'm curious since so many imports are moving around |
cdcfc2c to
21016c0
Compare
|
@wesm , good point. I reverted import changes. |
|
To provide more details, I compared the warning of checkstyle before and after this patch. It turns out this patch fixes identation , whitespace and EmptyLineSeparator warning and doesn't fix the rest. I think fixing all checkstyle warning is going to be more work (unless there is some magic that I missed). How about we merge this change to fix indentation , whitespace and EmptyLineSeparator for now? For referrence: After: |
|
Are we dependent on people using the same IDE with same formatting settings? For example, in my PR #925 even though I didn't touch many lines of code, formatting was still disturbed and different than what is present in the code-line. Can this happen in future? Like, if someone uses a completely different IDE with different formatting, are we again going to run into this problem again? Can we have some generic recommendations/best-practices for people to follow/impose in their respective IDEs before creating PRs? |
|
@siddharthteotia The formatting changes you saw in #925 are because of incorrect whitespace/indentation. It doesn't matter which ide you are using, it will all cause whitespace/indentation issue. The PR fixes those.
Not with indentation/whitespace. Those are pretty standardized with IDEs. However, we should maybe standardize/publish formatter configs for IDEs in the repo. For as I can tell, this patch is not dependent on Intellij format, since I imported google_checks.xml into intellij instead of using the default formatter. |
|
I don't think we should have settings like: (typecast) variable_name instead of (typecast)variable_name. The latter is preferable Similarly, we should have for() instead of for (). @StevenMPhillips , any thoughts? |
|
typecast followed by whitespace is not defined the google_checks. I am leaning towards having white space after cast because it's the default behavior of eclipse and intellij, but if there is already established style guide in Arrow, I am happy to follow. whitespace after |
|
Ping @StevenMPhillips |
wesm
left a comment
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.
This LGTM. @icexelloss can you resolve the rebase conflict?
21016c0 to
0ba9e03
Compare
|
@wesm, I resolved the conflict. |
|
Thanks. I'm going to hold off on merging this until #898 is in |
wesm
left a comment
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
…arator checkstyle warnings in Java Author: Li Jin <[email protected]> Closes apache#930 from icexelloss/checkstyle-fix-ARROW-1304 and squashes the following commits: 0ba9e03 [Li Jin] ARROW-1304: [Java] Reformat java code with google_checks.xml to improve checkstyle
No description provided.