From: Jani Nikula Date: Mon, 30 Jan 2012 16:01:15 +0000 (+0200) Subject: Re: [PATCH] STYLE: Initial draft of coding style document X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=a2e5a1a5fc708ce10f4f9299816d26c0d7eb6726;p=notmuch-archives.git Re: [PATCH] STYLE: Initial draft of coding style document --- diff --git a/55/5b7b985649fca82a2330caf574130193d73f3c b/55/5b7b985649fca82a2330caf574130193d73f3c new file mode 100644 index 000000000..b5af18054 --- /dev/null +++ b/55/5b7b985649fca82a2330caf574130193d73f3c @@ -0,0 +1,180 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id F3C65431E64 + for ; Mon, 30 Jan 2012 08:01:18 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.699 +X-Spam-Level: +X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 + tests=[HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id LW6auxftsU0l for ; + Mon, 30 Jan 2012 08:01:18 -0800 (PST) +Received: from mail-pz0-f53.google.com (mail-pz0-f53.google.com + [209.85.210.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 28CE5431FBC + for ; Mon, 30 Jan 2012 08:01:18 -0800 (PST) +Received: by dadv6 with SMTP id v6so4707384dad.26 + for ; Mon, 30 Jan 2012 08:01:16 -0800 (PST) +MIME-Version: 1.0 +Received: by 10.68.74.72 with SMTP id r8mr42556447pbv.8.1327939275958; Mon, 30 + Jan 2012 08:01:15 -0800 (PST) +Received: by 10.68.236.137 with HTTP; Mon, 30 Jan 2012 08:01:15 -0800 (PST) +Received: by 10.68.236.137 with HTTP; Mon, 30 Jan 2012 08:01:15 -0800 (PST) +In-Reply-To: +References: <1327708018-1107-1-git-send-email-david@tethera.net> + +Date: Mon, 30 Jan 2012 18:01:15 +0200 +Message-ID: + +Subject: Re: [PATCH] STYLE: Initial draft of coding style document +From: Jani Nikula +To: Tomi Ollila +Content-Type: multipart/alternative; boundary=f46d040f9ca2d3a82204b7c0f4fc +Cc: notmuch@notmuchmail.org, David Bremner +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 30 Jan 2012 16:01:19 -0000 + +--f46d040f9ca2d3a82204b7c0f4fc +Content-Type: text/plain; charset=UTF-8 + +On Jan 30, 2012 4:38 PM, "Tomi Ollila" wrote: +> +> On Fri, 27 Jan 2012 19:46:58 -0400, David Bremner +wrote: +> > From: David Bremner +> +> [ ... ] +> +> > + +> > +* Indent is 4 spaces with mixed tabs/spaces and a tab width of 8. +> > + Tabs should be only at the beginning of the line. +> +> So, after initial indentation (with tabs) there should not be further +> tabs? We'll be using the former instead of the latter in these 2 below? + +I'd prefer tabs for aligning comments at the end of lines. + +> +> /* excerpt from command-line-arguments.h -- indentation without tabs */ +> +> enum notmuch_opt_type { +> NOTMUCH_OPT_END = 0, +> NOTMUCH_OPT_BOOLEAN, /* --verbose */ +> NOTMUCH_OPT_INT, /* --frob=8 */ +> NOTMUCH_OPT_KEYWORD, /* --format=raw|json|text */ +> NOTMUCH_OPT_STRING, /* --file=/tmp/gnarf.txt */ +> NOTMUCH_OPT_POSITION /* notmuch dump pos_arg */ +> }; +> +> /* excerpt from command-line-arguments.h -- indentation with tabs */ +> +> enum notmuch_opt_type { +> NOTMUCH_OPT_END = 0, +> NOTMUCH_OPT_BOOLEAN, /* --verbose */ +> NOTMUCH_OPT_INT, /* --frob=8 */ +> NOTMUCH_OPT_KEYWORD, /* --format=raw|json|text */ +> NOTMUCH_OPT_STRING, /* --file=/tmp/gnarf.txt */ +> NOTMUCH_OPT_POSITION /* notmuch dump pos_arg */ +> }; +> +> +> [ ... ] +> +> +> Tomi +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch + +--f46d040f9ca2d3a82204b7c0f4fc +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +


+On Jan 30, 2012 4:38 PM, "Tomi Ollila" <tomi.ollila@iki.fi> wrote:
+>
+> On Fri, 27 Jan 2012 19:46:58 -0400, David Bremner <david@tethera.net> wrote:
+> > From: David Bremner <bre= +mner@debian.org>
+>
+> [ ... ]
+>
+> > +
+> > +* Indent is 4 spaces with mixed tabs/spaces and a tab width of 8= +.
+> > + =C2=A0Tabs should be only at the beginning of the line.
+>
+> So, after initial indentation (with tabs) there should not be further<= +br> +> tabs? We'll be using the former instead of the latter in these 2 b= +elow?

+

I'd prefer tabs for aligning comments at the end of lines.

+

>
+> /* excerpt from command-line-arguments.h -- indentation without tabs *= +/
+>
+> enum notmuch_opt_type {
+> =C2=A0 =C2=A0NOTMUCH_OPT_END =3D 0,
+> =C2=A0 =C2=A0NOTMUCH_OPT_BOOLEAN, =C2=A0 =C2=A0 =C2=A0 =C2=A0/* --verb= +ose =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/
+> =C2=A0 =C2=A0NOTMUCH_OPT_INT, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= +=A0/* --frob=3D8 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 */
+> =C2=A0 =C2=A0NOTMUCH_OPT_KEYWORD, =C2=A0 =C2=A0 =C2=A0 =C2=A0/* --form= +at=3Draw|json|text */
+> =C2=A0 =C2=A0NOTMUCH_OPT_STRING, =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* --file= +=3D/tmp/gnarf.txt =C2=A0*/
+> =C2=A0 =C2=A0NOTMUCH_OPT_POSITION =C2=A0 =C2=A0 =C2=A0 =C2=A0/* notmuc= +h dump pos_arg =C2=A0 */
+> };
+>
+> /* excerpt from command-line-arguments.h -- indentation with tabs */ +>
+> enum notmuch_opt_type {
+> =C2=A0 =C2=A0NOTMUCH_OPT_END =3D 0,
+> =C2=A0 =C2=A0NOTMUCH_OPT_BOOLEAN, =C2=A0 =C2=A0 =C2=A0 =C2=A0/* --verb= +ose =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/
+> =C2=A0 =C2=A0NOTMUCH_OPT_INT, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= +=A0/* --frob=3D8 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 */
+> =C2=A0 =C2=A0NOTMUCH_OPT_KEYWORD, =C2=A0 =C2=A0 =C2=A0 =C2=A0/* --form= +at=3Draw|json|text */
+> =C2=A0 =C2=A0NOTMUCH_OPT_STRING, =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* --file= +=3D/tmp/gnarf.txt =C2=A0*/
+> =C2=A0 =C2=A0NOTMUCH_OPT_POSITION =C2=A0 =C2=A0 =C2=A0 =C2=A0/* notmuc= +h dump pos_arg =C2=A0 */
+> };
+>
+>
+> [ ... ]
+>
+>
+> Tomi
+> _______________________________________________
+> notmuch mailing list
+> notmuch@notmuchmail.org= +
+> http://not= +muchmail.org/mailman/listinfo/notmuch
+

+ +--f46d040f9ca2d3a82204b7c0f4fc--