Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 3/3] utils/get-developers: print error for correct line
Date: Mon, 1 Aug 2022 23:04:17 +0200	[thread overview]
Message-ID: <20220801230417.235340af@windsurf> (raw)
In-Reply-To: <20220724235301.3708271-3-ricardo.martincoski@gmail.com>

Hello Ricardo,

On Sun, 24 Jul 2022 20:53:01 -0300
Ricardo Martincoski <ricardo.martincoski@gmail.com> wrote:

> diff --git a/utils/getdeveloperlib.py b/utils/getdeveloperlib.py
> index f9f84ee8e1..3383df3c9e 100644
> --- a/utils/getdeveloperlib.py
> +++ b/utils/getdeveloperlib.py
> @@ -233,21 +233,22 @@ def parse_developers(filename=None):
>      global unittests
>      unittests = list_unittests()
>      developers_fname = filename or os.path.join(brpath, 'DEVELOPERS')
>      with open(developers_fname, mode='r', encoding='utf_8') as f:
>          files = []
>          name = None
>          for line in f:
> +            linen += 1
>              line = line.strip()
>              if line.startswith("#"):
>                  continue
>              elif line.startswith("N:"):
>                  if name is not None or len(files) != 0:
>                      errors += 1
> -                    print("Syntax error in DEVELOPERS file, line %d" % linen,
> +                    print("Syntax error in DEVELOPERS file, just before line %d" % linen,

What about:

+                    print("Syntax error in DEVELOPERS file, line %d" % linen-1,

because well "just before line %d" seems a bit weird.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-08-01 21:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-24 23:52 [Buildroot] [PATCH 1/3] support/testing/tests: improve get-developers test Ricardo Martincoski
2022-07-24 23:53 ` [Buildroot] [PATCH 2/3] utils/get-developers: bail out on parsing errors Ricardo Martincoski
2022-08-01 21:03   ` Thomas Petazzoni via buildroot
2022-07-24 23:53 ` [Buildroot] [PATCH 3/3] utils/get-developers: print error for correct line Ricardo Martincoski
2022-08-01 21:04   ` Thomas Petazzoni via buildroot [this message]
2022-08-01 20:59 ` [Buildroot] [PATCH 1/3] support/testing/tests: improve get-developers test Thomas Petazzoni via buildroot

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=20220801230417.235340af@windsurf \
    --to=buildroot@buildroot.org \
    --cc=ricardo.martincoski@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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