From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: Coccinelle ML <cocci@inria.fr>
Subject: Re: [cocci] How do I disable formatting for the "+"-side of a rule?
Date: Fri, 15 Jul 2022 11:50:43 +0200 [thread overview]
Message-ID: <220715.861qum1z6o.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2207141246300.3019@hadrien>
On Thu, Jul 14 2022, Julia Lawall wrote:
>> Thanks, no it just changes the spacing of the "=", i.e.:
>>
>> + struct ref_array array = {
>>
>> v.s. with --smpl-spacing:
>>
>> + struct ref_array array<TAB>= {
>
> Strange about the tab. There was no intent to have alignment.
>
>> (Or similar, I think it's aligning to the "=" above it?)
>>
>> But the rest is the same, i.e. a \n after the "{", the "0" on its own
>> line etc.
>
> Coccinelle now just does what you asked for. If there is one element in
> the initializer, it doesn't add newlines. So no need for the
> --smpl-spacing argument.
Fantastic! I just tried with your
https://github.com/coccinelle/coccinelle/commit/bcc39cff36dcc8bbad3e2131fd92addc3ffa4ee5
and it formats it as expected, thanks a lot for the help & quick fix!
prev parent reply other threads:[~2022-07-15 9:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 9:31 [cocci] How do I disable formatting for the "+"-side of a rule? Ævar Arnfjörð Bjarmason
2022-07-14 9:39 ` Julia Lawall
2022-07-14 9:52 ` Ævar Arnfjörð Bjarmason
2022-07-14 10:47 ` Julia Lawall
2022-07-15 9:50 ` Ævar Arnfjörð Bjarmason [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=220715.861qum1z6o.gmgdl@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=cocci@inria.fr \
--cc=julia.lawall@inria.fr \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).