From dev-return-81793-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Sat Jun 29 05:59:27 2019 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 09FDA18066B for ; Sat, 29 Jun 2019 07:59:26 +0200 (CEST) Received: (qmail 26854 invoked by uid 500); 29 Jun 2019 05:59:26 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 26840 invoked by uid 99); 29 Jun 2019 05:59:25 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Jun 2019 05:59:25 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 8006A1A439A for ; Sat, 29 Jun 2019 05:59:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.051 X-Spam-Level: ** X-Spam-Status: No, score=2.051 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id lprtTj3qxODR for ; Sat, 29 Jun 2019 05:59:22 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::532; helo=mail-pg1-x532.google.com; envelope-from=wander4096@gmail.com; receiver= Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id 37078BC23F for ; Sat, 29 Jun 2019 05:59:21 +0000 (UTC) Received: by mail-pg1-x532.google.com with SMTP id m4so3532929pgk.0 for ; Fri, 28 Jun 2019 22:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=f3hewuO/GGaV/iFEtAQrf4nsBWu/veVZaG8WSpGoXwo=; b=amBhOUGPs3sg5R/TgytBJPya/UWSB7LqEqfG2NcNxRjPVbs081IppJNwbnusA4asKK oaPKIH8sSdp4Fq6Yzn2cNT5X1pFzH620nuDEhBMBw1EDwzhKHAFiE8XGZ4UIX1teFcmA 7WDl541FNNTOD7BcTKgw0mY6pDXTN2xdQTDBnUnggKvcZFk5Qr6xhAFMOm72vxsHgR8O 2zDB3bovkhlMhGtoR3USY+AlrD+HyJ5xnQGg7EGXB9r/k8SnhN86kkzGGvEG/ark3E8g k+pX0r8c1fA7wQ6I4SkkWS+wf1G3rKSa3G+4KILc8Lb3vH9t79QTugQfarQSOPeGuwJC G7CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=f3hewuO/GGaV/iFEtAQrf4nsBWu/veVZaG8WSpGoXwo=; b=mOhVvhIR0tz//y1Xi6n/0sA+VFnleerEGfdK2EEaM74DUUX/tp7ryEkIovrbjqyNBS 5xq4Ew3A5kA2vP6uu89FJ4KCU46I9OD5Wi8j/4Kdje4Wj/2xp9mjHJwwi5lFqdJRfiTS 7eBO+JZJWZhHztNkfIYeOAKdDgbmS6y8xghGp5tpLFE+5G5eBgIhpRbEmc03bfRRZDdR 6Z0w83AHHTjjbIfB8yT4oy4KU4ASs8V8Zx9DFhO8MmjoaEln8eKb1GtXd9Kp/+1QHRwg 8itaF3oFusAggwUkpTTMnE7RTyG+KATyNVoaGCMGn5iwaJMKimfjCEzVlABzXsxuzL2/ qC+A== X-Gm-Message-State: APjAAAWTNWA0NGm2viVT9og+XE4mdkAlE+GoGseg5hgyBZuH65pluZ68 Ol8xo8gmA3xAJ5bQECfqb69Rl2FSIvszlLrjky4GQnJbuuQ= X-Google-Smtp-Source: APXvYqzG9TP2QtpEdF8HJzkyMQhvsE7LyB26b41RhWi4WZtuA2DOuiOlzsXPwdHik4uoMzh2GUrMWFCaqCM4t4uSymo= X-Received: by 2002:a63:6b46:: with SMTP id g67mr12965058pgc.45.1561787953106; Fri, 28 Jun 2019 22:59:13 -0700 (PDT) MIME-Version: 1.0 References: <20190623131048.33E1F19000E1@webmail.sinamail.sina.com.cn> In-Reply-To: From: Zili Chen Date: Sat, 29 Jun 2019 13:58:36 +0800 Message-ID: Subject: Re: Clean up the all the checkstyle violations in the zookeeper-server module To: DevZooKeeper Content-Type: multipart/alternative; boundary="00000000000028d27e058c70183a" --00000000000028d27e058c70183a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you Enrico. It seems my previous reply delivered into another thread. Repost below. Hi zookeepers, I have proceeded ZOOKEEPER-3446 and been guided to here to discuss for a consensus before any more efforts. In general=EF=BC=8C +1 on introducing and forcing checkstyle. About the process, I agree that we firstly reach a consensus on the configuration and enable it per package. In order for our contributors to rebase as few times as possible, we'd better introduce all rules we all agree on at once. Note that we could always add rule if someone ask for and agreed by the community. Currently, we turn on checkstyle on all modules. Following the process above, we firstly turn off it once we apply the new configuration, and then turn on it per package. If the community is willing to do this work, a JIRA about the new checkstyle configuration should be filed and we continue the discussion there. Generally, rules proposed by Enrico are good start point and I agree on we should not introduce anything "fancy", but according to what is actually needed. Best, tison. Enrico Olivelli =E4=BA=8E2019=E5=B9=B46=E6=9C=8829=E6= =97=A5=E5=91=A8=E5=85=AD =E4=B8=8B=E5=8D=881:51=E5=86=99=E9=81=93=EF=BC=9A > @Zili Chen > This is the original email thread. So you can answer here. > > Enrico > > Il ven 28 giu 2019, 11:04 Norbert Kalmar h= a > scritto: > > > Community is eager to jump on on this, we already have pull requests > > cleaning up imports :) > > > > First of all, sorry for the late reply (I thought I already answered > this, > > I remember reading it and drawing up an answer. Oh well) > > > > Some big patches are already reviewed, I think we should commit as much > as > > possible before doing this refactor. (I'll also try to rev up my code > > review/commit thread) > > > > As for waiting for 3.6.0 - I don't see the reason we should. Unless of > > course this would delay the release too much... > > > > I haven't checked HBase checkstyle against our code, I don't think we > > should introduce anything "fancy". What Enrico listed up sounds like a > good > > starting point. > > > > +1 on introducing and forcing checkstyle. > > > > Regards, > > Norbert > > > > > > On Sun, Jun 23, 2019 at 7:27 PM Enrico Olivelli > > wrote: > > > > > Justin, > > > Thank you so much for your help in this. > > > > > > I would suggest to apply all of the rules in one pass, splitting the > work > > > per package. > > > This way reviews will be easier, we will limit the number of commits > and > > we > > > won't annoy too much the contributors , asking for hard rebases > > > > > > This is how we did it on Apache Bookkeeper > > > https://github.com/apache/bookkeeper/issues/230 > > > > > > I will help review and commit all of your patches, it will be mostly= a > > > matter of code reformat without any behavior change. > > > Currently I am doing the same kind of work on others projects of my > > > company, so I perfectly know how the work will go. > > > > > > Before starting we must ensure that: > > > 1) community is willing to do this work (we will force a rebase on > mostly > > > every pending PR) > > > 2) the proposed configuration is accepted by the community > > > 3) it is the good time to do it, or should we wait for 3.6.0 to be ou= t > > > > > > > > > I see you are referring to hbase checkstyle file, did you already > > checked > > > how much different it is from current project style? > > > Will we only need to remove trailing spaces, reorder members, fix > > imports, > > > cut long lines ? > > > > > > > > > Cheers > > > Enrico > > > > > > > > > > > > Il dom 23 giu 2019, 15:11 Justin Ling Mao > ha > > > scritto: > > > > > > > Background:zookeeper-server is the main-module of the zk codebase. > > > > Unfortunately, there were many checkstyle violations in it. To > improve > > > the > > > > code quality and code standards, > > > > IMHO, it's time to clean up the all the checkstyle violations(turn = on > > the > > > > true). we can learn from the hba= se > > > whose > > > > checkstyle(almost 40+ rules) is very strict and ensures a very > unified > > > code > > > > style.( > > > > > > > > > > https://github.com/apache/hbase/blob/master/hbase-checkstyle/src/main/res= ources/hbase/checkstyle.xml > > > > ) > > > > My planing is: clean up the all the checkstyle one rule by another = to > > > > avoid too much code changes for review. > > > > Everything's hard in the beginning, I have fired my first shot( > > > > https://github.com/apache/zookeeper/pull/992). > > > > If this draft has accepted by the community, I will create the > > > > corresponding sub-tasks for more people joining this work. > > > > > > > > Cited the comment from Enrico Olivelli in the > > > > > > > > > > ZOOKEEPER-3431:----------------------------------------------------------= ----we > > > > have to discuss this topic with the community.I have experience on > > > > BookKeeper, we had to clean up groups of packages.This is the kind = of > > > stuff > > > > that invalidates all of the pending pull requests.I have already se= tt > > up > > > a > > > > basic checkstyle configuration file and it is already active but it > is > > > > performing only very basic checks (like no 'author' tags).I will > > > appreciate > > > > very much if you want to drive this effort, personally I would star= t > > this > > > > stuff after 3.6.0 release, once we consolidate current master and t= he > > > maven > > > > build. I would have sent an email on the dev@ list soon.We also hav= e > > to > > > > agree on the checkstyle configuration, it is not trivial, I would > take > > > the > > > > file from HBase, BookKeeper or other ASF projects on the Haddoop > > > ecosystem. > > > > > > --00000000000028d27e058c70183a--