Skip to content
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-208: Add checkstyle policy to java project #96

Closed
wants to merge 2 commits into from

Conversation

oza
Copy link
Contributor

@oza oza commented Jun 30, 2016

No description provided.

@oza
Copy link
Contributor Author

oza commented Jun 30, 2016

Adding a google-style checkstyle

@julienledem
Copy link
Member

LGTM.
@StevenMPhillips: opinion?

@julienledem
Copy link
Member

@oza: how come it passes without changing anything to the code?

@oza
Copy link
Contributor Author

oza commented Sep 1, 2016

@julienledem thanks for your review and sorry for the delay. The result of mvn checkstyle:checkstyle dumps over 1400 warnings. Can we fix it on another jira?

@wesm
Copy link
Member

wesm commented Sep 1, 2016

Should probably use this JIRA to fix the styles

@oza
Copy link
Contributor Author

oza commented Sep 2, 2016

Sure, I will send a PR to fix the styles here.

@julienledem
Copy link
Member

@oza depending on what the issues are you can also add some excludes.

@oza
Copy link
Contributor Author

oza commented Sep 5, 2016

@julienledem fixing coding style which we can fix with IDE straightforwardly. Could you check it?

About vector directory, we should also check LOC and import ordering, but it cannot do with java configuration.

@oza
Copy link
Contributor Author

oza commented Sep 6, 2016

I sent PR with wrong pom.xml configuration by my mistake. Resent PR.

@julienledem
Copy link
Member

+1 LGTM
Sorry, this needs to be rebased.

@julienledem
Copy link
Member

to ease the transition, I'd increase the column limit a bit.

@wesm
Copy link
Member

wesm commented Oct 18, 2016

Can this be rebased?

@wesm
Copy link
Member

wesm commented Dec 2, 2016

@oza can you rebase? Thanks

@wesm
Copy link
Member

wesm commented Dec 13, 2016

@oza rebase?

@wesm
Copy link
Member

wesm commented Jan 6, 2017

Happy new year. Can you rebase?

@julienledem
Copy link
Member

@oza if you rebase we'll merge. Also to ease the transition, I'd increase the column limit a bit.

@wesm
Copy link
Member

wesm commented Jan 21, 2017

@julienledem @jacques-n it looks like the contributor isn't coming back. Can someone from the Java side pick this up and make a new patch? I'd like to be able to write patches for the Java codebase with confidence that I'm not messing up the code style, but I'm not very savvy when it comes to editor configuration.

@kiril-me
Copy link

I have started to look at checkstyles. Google check style is strict. Should we change it:

  • increase line size to 120
  • change method parameter name and local variable name regex to ^a-z?$ (we have nSize, nLogged variables)
  • Allow newline in Javadoc
  • Javadoc optional or required?
  • Method name can start with _

@wesm
Copy link
Member

wesm commented Feb 23, 2017

@kiril-me seems OK to me. 120 characters seems quite wide, what is the norm in other ASF Java projects (100 seems like a reasonable max -- in C++ we are limiting to 90)?

@julienledem we should prioritize this patch because other patches (e.g. #334) are having style issues

@oza
Copy link
Contributor Author

oza commented Feb 27, 2017

@julienledem sorry for the delay. I would like to rebase the patch with 100 LOC based on @wesm's comment.

@oza oza force-pushed the ARROW-208 branch 3 times, most recently from 00e78c0 to cfdfd7b Compare February 27, 2017 15:01
@oza
Copy link
Contributor Author

oza commented Feb 27, 2017

  • Rethinking of enabling failOnViolation and failsOnError, because there are thousands of code style violations and errors. Instead of doing it here, I just added option, checkstyle.failOnViolation. We can enable it by using -D option like this: mvn clean install -DskipTests -Dcheckstyle.failOnViolation.
  • Rethinking of fixing checkstyle warnings here. Hence, I just uploaded a change against root pom.xml. Let's do this on separate issue. If it's time to fix, I would like to work on that with other contributors.

What do you think?

@wesm
Copy link
Member

wesm commented Feb 27, 2017

We'd probably want to wait until #334 is done before doing the style changes.

@oza
Copy link
Contributor Author

oza commented Feb 27, 2017

Sure. Please ping me if I miss #334 is merged.

@wesm
Copy link
Member

wesm commented Mar 16, 2017

hi @oza now that #334 has been merged, would you mind completing this patch? Thank you!!

@oza
Copy link
Contributor Author

oza commented Mar 19, 2017

The test failure is caused by being unable to download guava. It looks unrelated to me. Let me try to resubmitting tests again(by doing git push).

[ERROR]     Unresolveable build extension: Plugin kr.motd.maven:os-maven-plugin:1.5.0.Final or one of its dependencies could not be resolved: Could not transfer artifact com.google.guava:guava:jar:10.0.1 from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused: Connection timed out -> [Help 2]

@wesm
Copy link
Member

wesm commented Mar 19, 2017

@oza can you make the style fixes in this patch?

@oza
Copy link
Contributor Author

oza commented Mar 19, 2017

@wesm Okay, I formatted 80% of code in 809e729 with IDE. There are still javadoc and format warnings, which cannot be reformatted with IDE, but it's much get better formatted. I think it would be better to complete to fix in another jira. About vector code, they seem to be generated with template. This issue, IMHO, should be solved in another jira, too.

@wesm
Copy link
Member

wesm commented Mar 19, 2017

Thanks @oza -- @julienledem could you take a look?

Given we don't have many outstanding Java patches, it might be worth going ahead with the 120 -> 100 line length change right now, but we should try not to let this linger because there is other Java work pending.

The line wrapping in code comments seems a bit odd to me, this might merit some manual fixing at some point.

</goals>
</pluginExecutionFilter>
<action>
<ignore />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean that we don't run it at all?
can we just exclude the remaining errors?
we can exclude the generated code for now for example.

@julienledem
Copy link
Member

@oza Fixing remaining issues in another JIRA sounds good. I think you can add exclusions for the generated code for now.
@wesm I think we can improve the comments formatting as we go. This PR is big enough as it is and a pain to maintain.
The travis failure seems unrelated.

@asfgit asfgit closed this in a9a5701 Mar 21, 2017
wesm pushed a commit to wesm/arrow that referenced this pull request Sep 2, 2018
Still not an optimal size estimation but at least we will have always the required amount.

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes apache#96 from xhochy/parquet-599 and squashes the following commits:

e8044b5 [Uwe L. Korn] PARQUET-599: Better size estimation for levels
wesm pushed a commit to wesm/arrow that referenced this pull request Sep 4, 2018
Still not an optimal size estimation but at least we will have always the required amount.

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes apache#96 from xhochy/parquet-599 and squashes the following commits:

e8044b5 [Uwe L. Korn] PARQUET-599: Better size estimation for levels

Change-Id: I93e2b4d2914b50cf24889bcc0c20d669a49284d6
wesm pushed a commit to wesm/arrow that referenced this pull request Sep 6, 2018
Still not an optimal size estimation but at least we will have always the required amount.

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes apache#96 from xhochy/parquet-599 and squashes the following commits:

e8044b5 [Uwe L. Korn] PARQUET-599: Better size estimation for levels

Change-Id: I93e2b4d2914b50cf24889bcc0c20d669a49284d6
wesm pushed a commit to wesm/arrow that referenced this pull request Sep 7, 2018
Still not an optimal size estimation but at least we will have always the required amount.

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes apache#96 from xhochy/parquet-599 and squashes the following commits:

e8044b5 [Uwe L. Korn] PARQUET-599: Better size estimation for levels

Change-Id: I93e2b4d2914b50cf24889bcc0c20d669a49284d6
wesm pushed a commit to wesm/arrow that referenced this pull request Sep 8, 2018
Still not an optimal size estimation but at least we will have always the required amount.

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes apache#96 from xhochy/parquet-599 and squashes the following commits:

e8044b5 [Uwe L. Korn] PARQUET-599: Better size estimation for levels

Change-Id: I93e2b4d2914b50cf24889bcc0c20d669a49284d6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants