DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, thomas@monjalon.net
Subject: Re: [dpdk-dev] [PATCH] devtools: refuse indent with tabs in Meson
Date: Wed, 27 Oct 2021 10:57:24 +0100	[thread overview]
Message-ID: <YXkihM9d8ksnxJxV@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20211022205531.9966-1-david.marchand@redhat.com>

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 <david.marchand@redhat.com>

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

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(-)
> 
<snip>
> 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
<snip>

  reply	other threads:[~2021-10-27  9:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 20:55 David Marchand
2021-10-27  9:57 ` Bruce Richardson [this message]
2021-11-02 17:48   ` David Marchand
2021-11-02 18:05     ` Bruce Richardson
2021-11-02 18:23   ` David Marchand
2021-11-02 18:15 ` Stephen Hemminger
2021-11-02 18:22   ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YXkihM9d8ksnxJxV@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).