Thanks Hongbin! Well done! We hold high bar about code quality and with tools to enforce it.
On Sat, Jun 25, 2016 at 8:51 PM, hongbin ma <[email protected]> wrote: > Hi guys > > The code reformat is done for all of the JAVA files. > > In order to make sure everyone is committing well formatted codes, > I have also enabled the checkstyle maven plugin, whose check rules are > highly configurable. > To make our life easy I only chose basic rules regarding code format. > (check Kylin/checkstyle.xml and Kylin/checkstyle-suppressions.xml) > That is to say, you’ll rarely violate the checkstyle rules as long as you > remember to format code before committing. > > However, violation of the rules will cause build fail. > Since the chosen rule set is really small, you should almost never think > about removing rules to make your code compile. > There’re cases where you really can’t get over some certain rules, for > example, In CubeHBaseEndpointRPC we have a very long method (don’t have > time to reduce its size now): > The compile will fail due to: CubeHBaseEndpointRPC.java:263:5: Method > length is 157 lines (max allowed is 150). > Searching google with “site:checkstyle.sourceforge.net Method length is > lines (max allowed is). ” we’ll find it violates the “MethodLength” rule. > We can add @SuppressWarnings("checkstyle:methodlength") (use lower case!) > to the method to instruct checkstyle to overlook this occurrence. > > The only action you need to do now is to follow > http://kylin.apache.org/development/dev_env.html (Setup IDE code > formatter) > to setup formatter. > Perhaps enabling auto code format is a good option. > > Happy coding! > > -- > Regards, > > *Bin Mahone | 马洪宾* >
