From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30CE5C433F5 for ; Wed, 15 Sep 2021 09:50:50 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id A4C76610A4 for ; Wed, 15 Sep 2021 09:50:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A4C76610A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A52DA4013F; Wed, 15 Sep 2021 11:50:48 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 4A9104003F for ; Wed, 15 Sep 2021 11:50:47 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10107"; a="307823842" X-IronPort-AV: E=Sophos;i="5.85,295,1624345200"; d="scan'208";a="307823842" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2021 02:50:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,295,1624345200"; d="scan'208";a="452470059" Received: from silpixa00399126.ir.intel.com ([10.237.223.29]) by orsmga002.jf.intel.com with ESMTP; 15 Sep 2021 02:50:45 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Date: Wed, 15 Sep 2021 10:50:36 +0100 Message-Id: <20210915095036.22346-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] doc/contributing: add line continuation note to meson guide X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add a note for the preference of using "()" rather than "\" for line continuations in meson. Suggested-by: David Marchand Signed-off-by: Bruce Richardson --- doc/guides/contributing/coding_style.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst index d648689f10..b27b5fcfdb 100644 --- a/doc/guides/contributing/coding_style.rst +++ b/doc/guides/contributing/coding_style.rst @@ -1024,6 +1024,16 @@ The following guidelines apply to the build system code in meson.build files in * Line continuations should be doubly-indented to ensure visible difference from normal indentation. Any line continuations beyond the first may be singly indented to avoid large amounts of indentation. +* Where a line is split in the middle of a statement, e.g. a multiline `if` statement, + brackets should be used in preference to escaping the line break. + +Example:: + + if (condition1 and condition2 # line breaks inside () need no escaping + and condition3 and condition4) + x = y + endif + * Lists of files or components must be alphabetical unless doing so would cause errors. * Two formats are supported for lists of files or list of components: -- 2.30.2