From commits-return-9615-archive-asf-public=cust-asf.ponee.io@hudi.apache.org Mon Jan 13 03:14:19 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 51C5618025F for ; Mon, 13 Jan 2020 04:14:19 +0100 (CET) Received: (qmail 96879 invoked by uid 500); 13 Jan 2020 03:14:17 -0000 Mailing-List: contact commits-help@hudi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hudi.apache.org Delivered-To: mailing list commits@hudi.apache.org Received: (qmail 96760 invoked by uid 99); 13 Jan 2020 03:14:17 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jan 2020 03:14:17 +0000 From: GitBox To: commits@hudi.apache.org Subject: [GitHub] [incubator-hudi] leesf commented on issue #1208: [HUDI-304] Bring back spotless plugin Message-ID: <157888525719.8355.4057112022597559465.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Mon, 13 Jan 2020 03:14:17 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit leesf commented on issue #1208: [HUDI-304] Bring back spotless plugin URL: https://github.com/apache/incubator-hudi/pull/1208#issuecomment-573493705 > Thanks @leesf . The current IDE setup steps (https://hudi.incubator.apache.org/newsite-content/contributing) is inconsistent with the style settings present in the repository. > > We need to ensure the convention we enforce needs to be auto-settable in IDE (using IDE code-formatting options). For example : in IntelliJ, if we "Reformat Code" and "Optimize Imports", it should bring the code to a state where checkstyle needs to pass. This is how it used to be with minor caveats. Can we ensure we reach that state. > > What we need is : > > 1. As spotless relies on eclipse style config, make changes to eclipse style config to make it consistent with current checkstyle setting so that we don't end up with massive change > 2. Also provide corresponding intellij settings (there are many intellij users here :) ) which is again consistent with eclipse style settings enforced by spotless > 3. Update https://hudi.incubator.apache.org/newsite-content/contributing to reflect how to set code style. For e.g: We are no longer using vanilla google style (which has 120 char limit for line boundary whereas we need 200 char limit) and so we cannot ask developers to use google code style directly. > > Let me your thoughts on this ? Thanks for your comments. Sorry I would not get the point that The current IDE setup steps (https://hudi.incubator.apache.org/newsite-content/contributing) is inconsistent with the style settings present in the repository? 1. Currently, when using "Reformat Code" and "Optimize Imports" in IntelliJ, the checkstyle would not pass, e.g. after reformatting the Indentation is 4 instead of 2, so it will fail. Seems like it has already happened before? 2. The rules introduced in eclipse-java-google-style.xml are compatible with rules in checkstyle.xml. 3. In my local dev, I use checkstyle plugin and the checkstyle.xml in (https://github.com/apache/incubator-hudi/tree/master/style), it plays well with spotless plugin(eclipse-java-google-style.xml) and checkstyle(checkstyle.xml). Please correct me if I am wrong. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services