From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <leif.lindholm@linaro.org>
Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com
 [IPv6:2a00:1450:400c:c09::22f])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by ml01.01.org (Postfix) with ESMTPS id E8E8F209589CB
 for <edk2-devel@lists.01.org>; Sat, 12 Aug 2017 03:01:28 -0700 (PDT)
Received: by mail-wm0-x22f.google.com with SMTP id t201so7544335wmt.1
 for <edk2-devel@lists.01.org>; Sat, 12 Aug 2017 03:03:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-disposition:in-reply-to:user-agent;
 bh=UwrZislMBvMp22xoyWdCEnFrQKNhH1qFrHKnjnSw9/s=;
 b=DmWkOFcr4dlkseYFrin3CJB5r0mWjZxrG7WxRzGC1jVHqtMzQP5uPtc2y3vPjSl5Bt
 TqX96QrBPjctGbj1OGIuRFVsuV4ST9XjMqMGDfkKPQW2IEsxGkI3C74xZR4UYUumSmU/
 A+ZBRmE7dw47wRy1j4WL1dmpgGjDjNAgmamjc=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:references
 :mime-version:content-disposition:in-reply-to:user-agent;
 bh=UwrZislMBvMp22xoyWdCEnFrQKNhH1qFrHKnjnSw9/s=;
 b=uDRP8eKL/sMqViktAQ6T+yVU851pf3SKV2YQ+lChhB0UQjZ5S77DS0uJ03L52iAQcx
 38DNDqZoZKs7QA2iU4mSxnz1g0AmkD5NdG0ltR5nrUvt7hwQYQ4vj8aU2kMOo1oPC1aw
 KZ1p76/vXcITuh1K3qhh+Ptv/Sk0o+yIIv9CUClyQ3j8GN3/3Tc/oT0jx9CO9rLMgNSd
 XO36rQbKDOY+lkEhZczv8UyGuw4Tu8x6a6qgMyPT23LYsTf/nPuZKajML5akJ0FqnO6q
 dPBKkT0JrZW3dyXNadzVa/Zp4uCWeZ3SEH3shQIDl5yHlt7GPHA73Ke8IB7qTey3xDso
 D0Xg==
X-Gm-Message-State: AHYfb5jrkQnPfUtFvOOdNmp+aq4XxIv8mcrrv0Jg03IYTQbF53MtaMoa
 7GSYTEaeHbltD/l6
X-Received: by 10.28.196.138 with SMTP id u132mr790192wmf.104.1502532228661;
 Sat, 12 Aug 2017 03:03:48 -0700 (PDT)
Received: from bivouac.eciton.net (bivouac.eciton.net.
 [2a00:1098:0:86:1000:23:0:2])
 by smtp.gmail.com with ESMTPSA id a43sm1858108wrc.64.2017.08.12.03.03.46
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 12 Aug 2017 03:03:47 -0700 (PDT)
Date: Sat, 12 Aug 2017 11:03:43 +0100
From: Leif Lindholm <leif.lindholm@linaro.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Laszlo Ersek <lersek@redhat.com>, edk2-devel-01 <edk2-devel@lists.01.org>,
 Jordan Justen <jordan.l.justen@intel.com>,
 Michael D Kinney <michael.d.kinney@intel.com>
Message-ID: <20170812100343.64o2xr5qb6ozg2xj@bivouac.eciton.net>
References: <20170811164851.9466-1-lersek@redhat.com>
 <20170811164851.9466-2-lersek@redhat.com>
 <CAKv+Gu-f3ijCjMaQbFiCU+OaQXD8vf_=N2b--Qt77c1jvhuAPg@mail.gmail.com>
MIME-Version: 1.0
In-Reply-To: <CAKv+Gu-f3ijCjMaQbFiCU+OaQXD8vf_=N2b--Qt77c1jvhuAPg@mail.gmail.com>
User-Agent: NeoMutt/20170113 (1.7.2)
Subject: Re: [edk2-CCodingStandardsSpecification PATCH 1/2] Source Files / General Rules: limit line lengths to 80 columns
X-BeenThere: edk2-devel@lists.01.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: EDK II Development  <edk2-devel.lists.01.org>
List-Unsubscribe: <https://lists.01.org/mailman/options/edk2-devel>,
 <mailto:edk2-devel-request@lists.01.org?subject=unsubscribe>
List-Archive: <http://lists.01.org/pipermail/edk2-devel/>
List-Post: <mailto:edk2-devel@lists.01.org>
List-Help: <mailto:edk2-devel-request@lists.01.org?subject=help>
List-Subscribe: <https://lists.01.org/mailman/listinfo/edk2-devel>,
 <mailto:edk2-devel-request@lists.01.org?subject=subscribe>
X-List-Received-Date: Sat, 12 Aug 2017 10:01:29 -0000
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Fri, Aug 11, 2017 at 11:52:44PM +0100, Ard Biesheuvel wrote:
> On 11 August 2017 at 17:48, Laszlo Ersek <lersek@redhat.com> wrote:
> > We currently say "stick with 80 if it's convenient, extend to 120
> > otherwise".
> 
> It doesn't say that. It says you can make an exception for postfix
> comments, which is not unreasonable imo.

Meh, I dislike postfix comments anyway.

> This means most of the code in MdePkg/MdeModulePkg (afaik) already
> violates the old coding styile, so what good is it going to do to
> further restrict it?

We can start applying it rigidly to new patches and have the codebase
improve over time.

Which will also work as a good canary for "hmm, no on has touched this
code in a very long time" :)

So for me:
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>


> > This is too lax; much new edk2 code ignores the 80 columns
> > recommendation, resulting in source files that are hard to read for some
> > contributors. Remove the 120 columns excuse and make 80 columns a
> > requirement.
> >
> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Leif Lindholm <leif.lindholm@linaro.org>
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> > ---
> >  5_source_files/README.md | 17 ++++++++++++-----
> >  README.md                |  1 +
> >  2 files changed, 13 insertions(+), 5 deletions(-)
> >
> > diff --git a/5_source_files/README.md b/5_source_files/README.md
> > index a93492db4f0f..546d44d94fcb 100644
> > --- a/5_source_files/README.md
> > +++ b/5_source_files/README.md
> > @@ -33,12 +33,19 @@
> >
> >  ## 5.1 General Rules
> >
> > -### 5.1.1 Lines shall be 120 columns, or less
> > +### 5.1.1 Lines shall be 80 columns, or less
> >
> > -Preferably, limit line lengths to 80 columns or less. When this doesn't leave
> > -sufficient space for a good postfix style comment, extend the line to a total
> > -of 120 columns. Having some level of uniformity in the expected width of the
> > -source is useful for viewing and printing the code.
> > +Limit line lengths to 80 columns.
> > +
> > +Lines longer than 80 columns make it more difficult for the reader to find the
> > +beginning of the next line. They also tend to prevent users from displaying two
> > +source listings side-by-side on common display devices.
> > +
> > +When the 80 columns limit doesn't leave sufficient space for a postfix style
> > +comment, break the line into shorter segments at logical boundaries (for
> > +example, between the arguments of a function call, adhering to the spacing
> > +rules), or replace the postfix style comment with a standalone comment that
> > +precedes the statement.
> >
> >  ### 5.1.2 Do not use tab characters
> >
> > diff --git a/README.md b/README.md
> > index 8b9675b94937..8fad5a327b8c 100644
> > --- a/README.md
> > +++ b/README.md
> > @@ -112,3 +112,4 @@ Copyright (c) 2006-2017, Intel Corporation. All rights reserved.
> >  | 2.1      | DRAFT for REFORMAT                                                                                                                                | 10/30/2015 |
> >  | 2.2      | Convert to Gitbook                                                                                                                                | June 2017  |
> >  |          | [#425](https://bugzilla.tianocore.org/show_bug.cgi?id=425) [CCS] clarify line breaking and indentation requirements for multi-line function calls |            |
> > +|          | Limit lines to 80 columns                                                                                                                         |            |
> > --
> > 2.13.1.3.g8be5a757fa67
> >
> >