Skip to content
This repository was archived by the owner on Oct 8, 2019. It is now read-only.

Add checkstyle at compile time#343

Open
oza wants to merge 2 commits into
myui:masterfrom
oza:checkstyle
Open

Add checkstyle at compile time#343
oza wants to merge 2 commits into
myui:masterfrom
oza:checkstyle

Conversation

@oza

@oza oza commented Sep 12, 2016

Copy link
Copy Markdown
Contributor

This PR enables compile-time coding style check by using maven-checkstyle-plugin.

Please run:

$ mvn clean compile

and it shows you the warning and error messages, based on Google Java Coding Style in maven-checkstyle-plugin: http://checkstyle.sourceforge.net/google_style.html

https://google.github.io/styleguide/javaguide.html

@oza oza changed the title Add checkstyle warnings at compile time Add checkstyle at compile time Sep 12, 2016
@maropu

maropu commented Sep 12, 2016

Copy link
Copy Markdown
Contributor

thanks for your work. Is this test failure expected?

[WARNING] Error injecting: org.apache.maven.plugin.checkstyle.CheckstyleViolationCheckMojo
java.lang.UnsupportedClassVersionError: com/puppycrawl/tools/checkstyle/api/CheckstyleException : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)

@maropu

maropu commented Sep 12, 2016

Copy link
Copy Markdown
Contributor

The related topic is #215. Could you let us know the hadoop policy of check styles?

@myui myui added this to the v0.4 milestone Sep 13, 2016
@myui myui self-assigned this Sep 13, 2016
@oza

oza commented Sep 14, 2016

Copy link
Copy Markdown
Contributor Author

You can check Hadoop Coding Style here.

@oza

oza commented Sep 14, 2016

Copy link
Copy Markdown
Contributor Author

The compile failure is caused since the version of checkstyle plugin only supports JDK8. Re-seinding PR soon to fix it.
http://stackoverflow.com/questions/10382929/how-to-fix-java-lang-unsupportedclassversionerror-unsupported-major-minor-versi

@maropu

maropu commented Sep 14, 2016

Copy link
Copy Markdown
Contributor

okay, thanks.

Signed-off-by: Tsuyoshi Ozawa <ozawa.tsuyoshi@gmail.com>
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.3%) to 35.138% when pulling b830f49 on oza:checkstyle into 2ea7bb3 on myui:master.

@coveralls

coveralls commented Sep 14, 2016

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.005%) to 34.855% when pulling b830f49 on oza:checkstyle into 2ea7bb3 on myui:master.

@maropu

maropu commented Sep 14, 2016

Copy link
Copy Markdown
Contributor

I think we need to at least turn off check-style warning logs for travis-ci because too long logs possibly cause test failures: travis-ci/travis-ci#3865

@maropu

maropu commented Sep 14, 2016

Copy link
Copy Markdown
Contributor

cc: @myui

@myui

myui commented Dec 3, 2016

Copy link
Copy Markdown
Owner

@oza Could you move this PR to https://github.com/apache/incubator-hivemall
Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants