From: Taylor Blau <me@ttaylorr.com>
To: Glen Choo <chooglen@google.com>
Cc: git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Elijah Newren" <newren@gmail.com>
Subject: Re: How do we review changes made with coccinelle?
Date: Fri, 31 Mar 2023 19:53:33 -0400 [thread overview]
Message-ID: <ZCdyfaiFH5s5eYUc@nand.local> (raw)
In-Reply-To: <kl6l7cuycd3n.fsf@chooglen-macbookpro.roam.corp.google.com>
On Thu, Mar 30, 2023 at 11:23:40AM -0700, Glen Choo wrote:
> - When do we introduce .pending.cocci vs .cocci?
The documentation in contrib/coccinelle/README is authoritative. I'll
refer you there for the full details, but the rough idea is that:
- *.cocci patches are used to guard against bad patterns in the code
(e.g., that we should never write "if (thing != NULL)" and instead "if
(thing)"). When applying these transformations leads to changes, they
are designed to break the build to avoid letting these bad patterns
enter our tree.
- *.pending.cocci patches are used to guide large scale refactorings,
like Ævar demonstrated in his last series. They don't cause us to fail
the build in the meantime while the refactoring is in progress.
The latter is useful when the refactoring is either (a) too large to fit
in a single patch, or (b) would cause too many conflicts with in-flight
series.
(FWIW, I think that I'm mixing up my terminology, in that *.cocci files
are typically referred to as "transformations" and the result of running
Coccinelle on them is used to produce a patch. Shows you how much I know
about Coccinelle ;-).)
Thanks,
Taylor
prev parent reply other threads:[~2023-03-31 23:53 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
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 [this message]
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=ZCdyfaiFH5s5eYUc@nand.local \
--to=me@ttaylorr.com \
--cc=avarab@gmail.com \
--cc=chooglen@google.com \
--cc=git@vger.kernel.org \
--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).