-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-3171: [Java] Enable checkstyle for line length and indentation #2512
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
ARROW-3171: [Java] Enable checkstyle for line length and indentation #2512
Conversation
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.
I'm not sure if this specific style of indentation is enforced by our checkstyle, but wanted to bring it up in case others had different preferences.
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.
I prefer this format. FYI I believe intellij does a different one where arguments hang off the opening parenthesis but I much prefer this pattern. +1 on enforcing it.
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.
Sounds good, I'll try to see if I can figure out how to enforce it. It's hard to tell right now because there are so many other warnings.
|
I vote for 140 or 160. 100 is so short on these widescreens. |
java/dev/checkstyle/suppressions.xml
Outdated
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.
Can you remind me why are we suppressing checks here?
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.
I'm suppressing all but the ones I have fixed so far, so I can do this incrementally. Eventually, this will be removed when the build passes all checks.
I'm fine with going above 100, although having it too long makes it hard to read. I would probably prefer 120, but I'm ok with 140. So +1 for 140. Any opinion on this @icexelloss ? |
|
I am +1 for 120 but ok with 140 too. |
|
FWIW In C++ we are 90 chars (Google limits to 80). But I guess Java devs mostly look at one file at a time? =) |
|
@jacques-n would you be ok with trying out 120 for the line length? It's always easier to make it bigger if it becomes too cumbersome |
|
I'm okay with 120. |
c8d16f2 to
59396db
Compare
|
Ok, I'm done with line length at 120 and indentation checks, please take another look - thanks! |
Codecov Report
@@ Coverage Diff @@
## master #2512 +/- ##
==========================================
+ Coverage 86.33% 87.49% +1.15%
==========================================
Files 308 259 -49
Lines 47120 44797 -2323
==========================================
- Hits 40682 39194 -1488
+ Misses 6366 5603 -763
+ Partials 72 0 -72Continue to review full report at Codecov.
|
|
ping @icexelloss @jacques-n , look ok to merge? |
|
lgtm +1 |
|
merged to master, thanks @jacques-n and @icexelloss ! |
This change enables checkstyle line length set at 120 columns and indentation checks. Author: Bryan Cutler <cutlerb@gmail.com> Closes apache#2512 from BryanCutler/java-checkstyle-line-length-whitespace-ARROW-3171 and squashes the following commits: 59396db <Bryan Cutler> fixed indentation for arrow-plasma ada5b0f <Bryan Cutler> fixed indentation for arrow-jdbc d7277bd <Bryan Cutler> fixed indentation for arrow-tools 989bdbb <Bryan Cutler> fixed indentation for arrow-vector 41379b2 <Bryan Cutler> fixed indentation for arrow-memory 27a4f15 <Bryan Cutler> fixed line length for arrow-jdbc 4d9ca04 <Bryan Cutler> fixed line length for arrow-vector 9fab019 <Bryan Cutler> fixed line length for arrow-memory 4f137dc <Bryan Cutler> increase line length to 120 49085ad <Bryan Cutler> enabled line length checks
This change enables checkstyle line length set at 120 columns and indentation checks.