git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Glen Choo <chooglen@google.com>
Cc: git@vger.kernel.org, "Taylor Blau" <me@ttaylorr.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Elijah Newren" <newren@gmail.com>
Subject: Re: How do we review changes made with coccinelle?
Date: Thu, 30 Mar 2023 12:13:07 -0700	[thread overview]
Message-ID: <xmqqtty2hx30.fsf@gitster.g> (raw)
In-Reply-To: <kl6l7cuycd3n.fsf@chooglen-macbookpro.roam.corp.google.com> (Glen Choo's message of "Thu, 30 Mar 2023 11:23:40 -0700")

Glen Choo <chooglen@google.com> writes:

> - Is it okay to give Reviewed-By on the basis of _just_ the in-tree
>   changes and ignore the .cocci patch?

If they were made in separate steps, sure.  If not, not really.  But
we can still say "I've checked the changes the author made to the
code and they looked good."  But we haven't reviewed the patch in
its entirety in such a case to give a Reviewed-by, I would thihk.

> - What do we do with .cocci after they've been applied?

When we keep .cocci rules in tree, "make coccicheck" would complain
on any new code that matches the preimage pattern of these rules and
adjust them.  Your use of memcpy() may be rewritten to COPY_ARRAY()
when appropriate.  At least that is the theory---an overly wide or
ad-hoc rule that depends too much on heuristic may misconvert future
code, which needs to be caught by reviewers when .cocci files are
added to the tree.

> - Do we care about new patches slowing down coccicheck?

Surely.

We may want to cull rules from time to time.  For example, a rule
that moves callers of an older API function to use a newer API
function has to be kept while the older API function still exists in
the tree to help topics that are still in flight, but eventually
everybody stops using it and the implementation of the older API
function gets removed.  We should make sure we remove the rule that
is now stale.

  reply	other threads:[~2023-03-30 19:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 18:23 How do we review changes made with coccinelle? Glen Choo
2023-03-30 19:13 ` Junio C Hamano [this message]
2023-03-31 17:17   ` Glen Choo
2023-03-31 18:17     ` Junio C Hamano
2023-03-31 23:49   ` Taylor Blau
2023-03-31 23:53 ` Taylor Blau

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=xmqqtty2hx30.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=chooglen@google.com \
    --cc=git@vger.kernel.org \
    --cc=me@ttaylorr.com \
    --cc=newren@gmail.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;
as well as URLs for NNTP newsgroup(s).