From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B915CA0C41; Wed, 15 Sep 2021 11:50:48 +0200 (CEST) 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