All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: John Snow <jsnow@redhat.com>
Cc: qemu-devel@nongnu.org, "Cleber Rosa" <crosa@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Beraldo Leal" <bleal@redhat.com>,
	"Michael Roth" <michael.roth@amd.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH 2/8] python/qapi: change "FIXME" to "TODO"
Date: Fri, 30 Aug 2024 13:09:36 +0200	[thread overview]
Message-ID: <87ikvicln3.fsf@pond.sub.org> (raw)
In-Reply-To: <20240820002318.1380276-3-jsnow@redhat.com> (John Snow's message of "Mon, 19 Aug 2024 20:23:11 -0400")

John Snow <jsnow@redhat.com> writes:

> qemu.git/python/setup.cfg disallows checking in any code with "XXX",
> "FIXME" or "TODO" in the comments. Soften the restriction to only
> prohibit "FIXME", and change the two occurrences of "FIXME" in qapi to
> read "TODO" instead.
>
> Signed-off-by: John Snow <jsnow@redhat.com>

I don't like forbidding FIXME comments.  It's as futile as forbidding
known bugs.  All it can accomplish is making people use other, and
likely less clear ways to document them.

Perhaps projects exist that use FIXME comments only for known bugs in
uncommitted code.  To me, that feels *nuts*.  I commit all kinds of crap
in my tree.  I don't need silly "make check" failures while I develop,
the non-silly ones cause enough friction already.

In fact, we're quite happy to use FIXME comments even in merged code:

    $ git-grep FIXME | wc -l
    494

I can't see why python/ should be different.

> ---
>  python/setup.cfg         | 5 +++++
>  scripts/qapi/commands.py | 2 +-
>  scripts/qapi/events.py   | 2 +-
>  3 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/python/setup.cfg b/python/setup.cfg
> index 3b4e2cc5501..72b58c98c99 100644
> --- a/python/setup.cfg
> +++ b/python/setup.cfg
> @@ -169,6 +169,11 @@ ignore-signatures=yes
>  # TODO: Remove after we opt in to Pylint 2.8.3. See commit msg.
>  min-similarity-lines=6
>  
> +[pylint.miscellaneous]
> +
> +# forbid FIXME/XXX comments, allow TODO.
> +notes=FIXME,
> +      XXX,
>  
>  [isort]
>  force_grid_wrap=4
> diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py
> index 79951a841f5..cffed6cd3ba 100644
> --- a/scripts/qapi/commands.py
> +++ b/scripts/qapi/commands.py
> @@ -385,7 +385,7 @@ def visit_command(self,
>                        coroutine: bool) -> None:
>          if not gen:
>              return
> -        # FIXME: If T is a user-defined type, the user is responsible
> +        # TODO: If T is a user-defined type, the user is responsible
>          # for making this work, i.e. to make T's condition the
>          # conjunction of the T-returning commands' conditions.  If T
>          # is a built-in type, this isn't possible: the
> diff --git a/scripts/qapi/events.py b/scripts/qapi/events.py
> index d1f639981a9..36dc0c50c78 100644
> --- a/scripts/qapi/events.py
> +++ b/scripts/qapi/events.py
> @@ -84,7 +84,7 @@ def gen_event_send(name: str,
>                     boxed: bool,
>                     event_enum_name: str,
>                     event_emit: str) -> str:
> -    # FIXME: Our declaration of local variables (and of 'errp' in the
> +    # TODO: Our declaration of local variables (and of 'errp' in the
>      # parameter list) can collide with exploded members of the event's
>      # data type passed in as parameters.  If this collision ever hits in
>      # practice, we can rename our local variables with a leading _ prefix,

Starting a comment with TODO tells me there's work to do.

Starting it with FIXME tells me there's a bug to fix.  That's more
specific.  Replacing FIXME by TODO loses information.



  reply	other threads:[~2024-08-30 11:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-20  0:23 [PATCH 0/8] move qapi under python/qemu/ John Snow
2024-08-20  0:23 ` [PATCH 1/8] python/qapi: correct re.Match type hints for 3.13 John Snow
2024-08-20 10:19   ` Philippe Mathieu-Daudé
2024-08-20  0:23 ` [PATCH 2/8] python/qapi: change "FIXME" to "TODO" John Snow
2024-08-30 11:09   ` Markus Armbruster [this message]
2024-08-30 18:33     ` John Snow
2024-08-31  6:02       ` Markus Armbruster
2024-09-03 16:44         ` John Snow
2024-08-20  0:23 ` [PATCH 3/8] python/qapi: add pylint pragmas John Snow
2024-08-20  0:23 ` [PATCH 4/8] python/qapi: remove outdated pragmas John Snow
2024-08-20  0:23 ` [PATCH 5/8] python/qapi: ignore missing docstrings in pylint John Snow
2024-08-20  0:23 ` [PATCH 6/8] python: allow short names for variables on older pylint John Snow
2024-08-20  0:23 ` [PATCH 7/8] python/qapi: move scripts/qapi to python/qemu/qapi John Snow
2024-08-30 11:20   ` Markus Armbruster
2024-08-30 11:29     ` Daniel P. Berrangé
2024-08-30 17:53       ` John Snow
2024-08-30 18:22     ` John Snow
2024-09-02  8:51       ` Daniel P. Berrangé
2024-09-02  9:35         ` Peter Maydell
2024-09-03 17:31         ` John Snow
2024-08-20  0:23 ` [PATCH 8/8] python/qapi: remove redundant linter configuration John Snow

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=87ikvicln3.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=bleal@redhat.com \
    --cc=crosa@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.