Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B660F200B66 for ; Thu, 18 Aug 2016 19:06:36 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B4D44160AAE; Thu, 18 Aug 2016 17:06:36 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D7416160A86 for ; Thu, 18 Aug 2016 19:06:35 +0200 (CEST) Received: (qmail 53866 invoked by uid 500); 18 Aug 2016 17:06:35 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 53854 invoked by uid 99); 18 Aug 2016 17:06:34 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2016 17:06:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5E0ADC68E7 for ; Thu, 18 Aug 2016 17:06:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.298 X-Spam-Level: * X-Spam-Status: No, score=1.298 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudera-com.20150623.gappssmtp.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Cql1E22ORyn2 for ; Thu, 18 Aug 2016 17:06:32 +0000 (UTC) Received: from mail-qk0-f171.google.com (mail-qk0-f171.google.com [209.85.220.171]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 370F15F4E5 for ; Thu, 18 Aug 2016 17:06:31 +0000 (UTC) Received: by mail-qk0-f171.google.com with SMTP id z190so22427683qkc.0 for ; Thu, 18 Aug 2016 10:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=giw5CeMArxgPmn9z0HO131qwO+zkGk0fYlLtX3ljgDw=; b=Rc7mHtaUzNjPNQhQbbl21iEFvzjgUNmeqfb08xaqyD6jvJ5n3splHMz8FXQaNLTOU7 n/NGaw5CLQiW0mY7uXXcVzupBKjck9wyx6FlNbTHoa/50nle9srJgKIV4aK+gkJz2WRT SawZhKu/Tu5udqJFP6dMoPSaCCqkqAUZgw9pBvEkAS7Pp7H95MaZ7Cf9i8e7AVStoDKa gwdbp1URAS5N232DNwSj1yfuxr5xAV+oj32o8MLv3HYXTSeiGGVmzGkFRytHxpGnq2PR JNl30BYeNKwV5L3xlCiQxUE5dl+Nt69tq8A+4h5Jr8MqAwb1qFnB8nD2ojx3tJMyIciR zZbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=giw5CeMArxgPmn9z0HO131qwO+zkGk0fYlLtX3ljgDw=; b=PfABppc59p6uFztu5qmKiLWFlEe7YRRCv+gNcf6pYNyyCIWJGbUIhXNmbvamQNYv8D 4KSZ3sDGcJ/0hw2UfBVt5xejIfIcyBcJCSEuoEWGWZlixgqHkQnY02LrgkwZJQr7fnch jt7JwVvnIgNlMcBMyMU7hFhya1OVrbJKa99T4QZ8eOPw1S4tF0WSacA0Fm6QFfZlIPQb Sri68EWwFwuDrGGf3vbJqMlafT4HTnMeFlLbYKKLo0vClUB0tP90xvsDsBCAlU/uVBve wBC021yTI1z9+HbeMV1ihRlKVE2V7qnTnO5YWomWcNFQqzvqumnUKAFyB+2U3kVg+VX7 pHvA== X-Gm-Message-State: AEkoouuZ9rONqXrE0cPETk0ai+AtbTO0cVvhcBkALDAXm/iq/NpoWIiaTMGEaxm/Xh4icOAgFG/bYsrSzAVCEurG X-Received: by 10.55.160.129 with SMTP id j123mr3924738qke.184.1471539990195; Thu, 18 Aug 2016 10:06:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.154.1 with HTTP; Thu, 18 Aug 2016 10:06:29 -0700 (PDT) In-Reply-To: References: From: Daniel Hecht Date: Thu, 18 Aug 2016 10:06:29 -0700 Message-ID: Subject: Re: Code formatting with clang-format To: dev@impala.incubator.apache.org Content-Type: multipart/alternative; boundary=94eb2c07104c638599053a5b9abb archived-at: Thu, 18 Aug 2016 17:06:36 -0000 --94eb2c07104c638599053a5b9abb Content-Type: text/plain; charset=UTF-8 Thanks. Randomly looking at a bunch of files, IMO the new formatting looks fine and even more readable in most cases. On Thu, Aug 18, 2016 at 9:54 AM, Jim Apple wrote: > Done: https://gerrit.cloudera.org/#/c/4046 > > On Thu, Aug 18, 2016 at 9:46 AM, Daniel Hecht wrote: > > > Is it easy to run over the whole backend? If so, why not do that and > post a > > gerrit review of the diff so people can spot check whatever files they > are > > interested in. > > > > On Thu, Aug 18, 2016 at 9:37 AM, Tim Armstrong > > wrote: > > > > > +1 to Jim's general approach. > > > > > > Maybe we should get a couple more people to try it out and give > > feedback? I > > > tried it out on a source file I was familiar way. > > > > > > On Tue, Aug 16, 2016 at 10:29 AM, Jim Apple > > wrote: > > > > > > > Oh, and I should note that this file, right now, only handles C++. > > > > clang-format also works with Java, but that's future research. > > > > > > > > On Tue, Aug 16, 2016 at 10:09 AM, Jim Apple > > > wrote: > > > > > I support incremental reformat, not bulk reformat. > > > > > > > > > > I think we should make this our canonical style, but I also think > we > > > > > should be willing to update it sometimes. I think when we do update > > > > > it, we don't need to do a bulk reformat. > > > > > > > > > > On Tue, Aug 16, 2016 at 9:06 AM, Tim Armstrong < > > > tarmstrong@cloudera.com> > > > > wrote: > > > > >> +1 for automating this. I think the style is pretty good even if > it > > > > doesn't > > > > >> exactly match. I think it will save a lot of time wrapping lines, > > etc. > > > > >> > > > > >> What is the proposed approach to putting this into use? Will we > just > > > > >> incrementally reformat things as they're touched with > > > git-clang-format, > > > > or > > > > >> try to do a bulk reformat? > > > > >> > > > > >> Will this be our canonical style? I.e. if a patch author or > reviewer > > > > >> doesn't like what clang-format does, do we just stick with the > > tool's > > > > >> output for consistency. > > > > >> > > > > >> My preference is that we just do it incrementally and that we do > > make > > > it > > > > >> our canonical style. > > > > >> > > > > >> > > > > >> On Tue, Aug 16, 2016 at 12:00 AM, Alex Behm < > alex.behm@cloudera.com > > > > > > > wrote: > > > > >> > > > > >>> +1 for abandoning some of our style idiosyncrasies in favor of > > > > >>> easy-to-maintain automation > > > > >>> > > > > >>> On Mon, Aug 15, 2016 at 4:57 PM, Henry Robinson < > > henry@cloudera.com> > > > > >>> wrote: > > > > >>> > > > > >>> > I think this is great - really useful to have. There are some > > small > > > > >>> > deviations from our traditional style (see the review for a > > couple > > > of > > > > >>> > them). They really don't bother me, and I think it's much > better > > to > > > > have > > > > >>> > automated formatting than to hang on to the position of a : in > a > > > > for() > > > > >>> > statement :) But I asked Jim if he'd start a thread here to > check > > > if > > > > >>> others > > > > >>> > agree. > > > > >>> > > > > > >>> > On 15 August 2016 at 15:18, Jim Apple > > > wrote: > > > > >>> > > > > > >>> > > I would like to have a clang-format config file in our > > directory > > > to > > > > >>> help > > > > >>> > > new contributors understand how to format code and have a > tool > > to > > > > do it > > > > >>> > for > > > > >>> > > them. Through the time I've been sending patches I've been > > > > >>> accumulating a > > > > >>> > > .clang-format file that seems to minimize the style comments > I > > > > get. You > > > > >>> > can > > > > >>> > > see it here: > > > > >>> > > > > > > >>> > > https://gerrit.cloudera.org/#/c/3886 > > > > >>> > > > > > > >>> > > And you can save it and upload it to play with here: > > > > >>> > > > > > > >>> > > http://zed0.co.uk/clang-format-configurator/ > > > > >>> > > > > > > >>> > > I would love to hear your thoughts. > > > > >>> > > > > > > >>> > > > > > >>> > > > > > >>> > > > > > >>> > -- > > > > >>> > Henry Robinson > > > > >>> > Software Engineer > > > > >>> > Cloudera > > > > >>> > 415-994-6679 > > > > >>> > > > > > >>> > > > > > > > > > > --94eb2c07104c638599053a5b9abb--