From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id CC8A16DE1422 for ; Thu, 13 Jun 2019 04:08:51 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.049 X-Spam-Level: X-Spam-Status: No, score=-0.049 tagged_above=-999 required=5 tests=[AWL=-0.048, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4EHL_6a1a19K for ; Thu, 13 Jun 2019 04:08:51 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id CB70B6DE12DE for ; Thu, 13 Jun 2019 04:08:35 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1hbNas-0007gj-HA; Thu, 13 Jun 2019 07:08:34 -0400 Received: (nullmailer pid 6324 invoked by uid 1000); Thu, 13 Jun 2019 11:08:38 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 1/8] STYLE: document rules for calls, block comments, ternary ops Date: Thu, 13 Jun 2019 08:08:30 -0300 Message-Id: <20190613110837.6256-2-david@tethera.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613110837.6256-1-david@tethera.net> References: <20190613110837.6256-1-david@tethera.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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: Thu, 13 Jun 2019 11:08:51 -0000 --- devel/STYLE | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/devel/STYLE b/devel/STYLE index da653124..aa9f0f3d 100644 --- a/devel/STYLE +++ b/devel/STYLE @@ -53,11 +53,18 @@ function (param_type param, param_type param) if/for/while test) and are preceded by a space. The opening brace of functions is the exception, and starts on a new line. -* Comments are always C-style /* */ block comments. They should start - with a capital letter and generally be written in complete - sentences. Public library functions are documented immediately - before their prototype in lib/notmuch.h. Internal functions are - typically documented immediately before their definition. +* Opening parens also cuddle, even if the first argument does not fit + on the same line. + +* Nested ternary operators should be parenthesized at least as as much + as "a ? (b ? c : d)" + +* Comments are always C-style /* */ block comments, with a leading * + each line. They should start with a capital letter and generally be + written in complete sentences. Public library functions are + documented immediately before their prototype in lib/notmuch.h. + Internal functions are typically documented immediately before their + definition. * Code lines should be less than 80 columns and comments should be wrapped at 70 columns. -- 2.20.1