hivemall
hivemall copied to clipboard
Add checkstyle at compile time
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
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)
The related topic is #215. Could you let us know the hadoop policy of check styles?
You can check Hadoop Coding Style here.
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
okay, thanks.
Coverage increased (+0.3%) to 35.138% when pulling b830f49fec2015e54ce3d78ad416e3812212456b on oza:checkstyle into 2ea7bb3c4589612330a75d627de58e10d668202c on myui:master.
Coverage decreased (-0.005%) to 34.855% when pulling b830f49fec2015e54ce3d78ad416e3812212456b on oza:checkstyle into 2ea7bb3c4589612330a75d627de58e10d668202c on myui:master.
I think we need to at least turn off check-style warning logs for travis-ci
because too long logs possibly cause test failures: https://github.com/travis-ci/travis-ci/issues/3865
cc: @myui
@oza Could you move this PR to https://github.com/apache/incubator-hivemall Thanks.