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 73DE2A0547; Wed, 27 Oct 2021 11:57:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5EAB140E0F; Wed, 27 Oct 2021 11:57:31 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id A8A96407FF for ; Wed, 27 Oct 2021 11:57:29 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10149"; a="316329436" X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="316329436" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 02:57:28 -0700 X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="447146152" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.16.125]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 27 Oct 2021 02:57:27 -0700 Date: Wed, 27 Oct 2021 10:57:24 +0100 From: Bruce Richardson To: David Marchand Cc: dev@dpdk.org, thomas@monjalon.net Message-ID: References: <20211022205531.9966-1-david.marchand@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211022205531.9966-1-david.marchand@redhat.com> Subject: Re: [dpdk-dev] [PATCH] devtools: refuse indent with tabs in Meson 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" On Fri, Oct 22, 2021 at 10:55:31PM +0200, David Marchand wrote: > The rule for indentation in Meson in DPDK is 4 spaces. > > Any tab should be flagged as an issue, let's extend the check and fix > existing offenders. > > Fixes: 4ad4b20a7905 ("drivers: change indentation in build files") > Fixes: 2457705e6474 ("crypto/cnxk: add driver skeleton") > Fixes: 634b73104482 ("app/testpmd: build on Windows") > Fixes: 3a6bfc37eaf4 ("net/ice: support QoS config VF bandwidth in DCF") > Fixes: 8ef09fdc506b ("build: add optional NUMA and CPU counts detection") > Fixes: e1369718f553 ("common/octeontx: enable build only on 64-bit Linux") > Fixes: 2b504721bfda ("app/bbdev: enable la12xx") > > Signed-off-by: David Marchand Acked-by: Bruce Richardson One small comment inline below. > --- > app/pdump/meson.build | 6 +-- > app/proc-info/meson.build | 6 +-- > app/test-acl/meson.build | 6 +-- > app/test-bbdev/meson.build | 8 ++-- > app/test-cmdline/meson.build | 6 +-- > app/test-compress-perf/meson.build | 6 +-- > app/test-crypto-perf/meson.build | 6 +-- > app/test-eventdev/meson.build | 6 +-- > app/test-fib/meson.build | 6 +-- > app/test-flow-perf/meson.build | 6 +-- > app/test-pipeline/meson.build | 6 +-- > app/test-regex/meson.build | 6 +-- > app/test-sad/meson.build | 6 +-- > app/test/meson.build | 6 +-- > config/meson.build | 58 +++++++++++++-------------- > devtools/check-meson.py | 3 ++ > drivers/compress/octeontx/meson.build | 6 +-- > drivers/crypto/cnxk/meson.build | 6 +-- > drivers/crypto/qat/meson.build | 2 +- > drivers/net/ice/meson.build | 2 +- > 20 files changed, 83 insertions(+), 80 deletions(-) > > diff --git a/devtools/check-meson.py b/devtools/check-meson.py > index 29f7887968..4b2338828d 100755 > --- a/devtools/check-meson.py > +++ b/devtools/check-meson.py > @@ -8,6 +8,7 @@ > > import sys > import os > +import re > from os.path import relpath, join > from argparse import ArgumentParser > > @@ -50,6 +51,8 @@ def check_indentation(filename, contents): > code, comments = split_code_comments(line) > if not code.strip(): > continue > + if re.match('^ *\t', code): > + print(f'Error parsing {filename}:{lineno}, got some tabulation') > if code.endswith('files('): > if infiles: > raise(f'Error parsing {filename}:{lineno}, got "files(" when already parsing files list') I wonder is there ever any scenario where we want to allow tabs on a line? If not, then rather than using regex, the check could be simplified to: if '\t' in line: > diff --git a/drivers/compress/octeontx/meson.build b/drivers/compress/octeontx/meson.build > index cd8687fde3..3a29c3e609 100644 > --- a/drivers/compress/octeontx/meson.build > +++ b/drivers/compress/octeontx/meson.build