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

Add checkstyle at compile time #343

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add checkstyle at compile time #343

wants to merge 2 commits into from

Conversation

oza
Copy link
Contributor

@oza oza commented Sep 12, 2016

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
Copy link
Contributor

maropu commented Sep 12, 2016

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
Copy link
Contributor

maropu commented Sep 12, 2016

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
Copy link
Contributor Author

oza commented Sep 14, 2016

You can check Hadoop Coding Style here.

@oza
Copy link
Contributor Author

oza commented Sep 14, 2016

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
Copy link
Contributor

maropu commented Sep 14, 2016

okay, thanks.

@coveralls
Copy link

Coverage Status

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

@coveralls
Copy link

coveralls commented Sep 14, 2016

Coverage Status

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

@maropu
Copy link
Contributor

maropu commented Sep 14, 2016

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
Copy link
Contributor

maropu commented Sep 14, 2016

cc: @myui

@myui
Copy link
Owner

myui commented Dec 3, 2016

@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