cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Fixing SmPL scripts for data output according to structured file formats
Date: Fri, 8 Nov 2019 13:51:20 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.1911081350350.2465@hadrien> (raw)
In-Reply-To: <bfd990c8-1c1d-a6ee-7b05-e9f80160712b@web.de>

[-- Attachment #1: Type: text/plain, Size: 1565 bytes --]



On Fri, 8 Nov 2019, Markus Elfring wrote:

> Hello,
>
> I have taken another look at a script for the semantic patch language.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/scripts/coccinelle/free/iounmap.cocci?id=cd0207a7bfd29016a4eeb0b0203fa900b41e4eee
>
> It belongs to the category of SmPL scripts which support data output also for
> structured file formats. The output order matters then for the integration of
> additional information so that preferably valid data are provided at
> appropriate places.
>
> A well-known file format like “Org mode” expects then that specific contents
> should be enclosed by corresponding tags.
> https://orgmode.org/manual/Literal-Examples.html
>
> But a SmPL rule which uses the SmPL asterisk functionality triggers immediate
> output of diff hunks so far (if a source code fragment was matched).
> I find such a data processing approach questionable for this operation mode.
>
> I imagine the following solution possibilities.
>
> 1. Separate SmPL rules should be used without SmPL asterisks.
>
> 2. It would occasionally be more convenient to redirect the output to standard
>    files into corresponding variables.
>
>
> How would you like to improve the software situation here?

make coccicheck uses --no-show-diff at the approrpiate place so that the *
have no effect if the context option is not chosen.

julia


>
> Regards,
> Markus
> _______________________________________________
> Cocci mailing list
> Cocci@systeme.lip6.fr
> https://systeme.lip6.fr/mailman/listinfo/cocci
>

[-- Attachment #2: Type: text/plain, Size: 136 bytes --]

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  reply	other threads:[~2019-11-08 12:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 12:15 [Cocci] Fixing SmPL scripts for data output according to structured file formats Markus Elfring
2019-11-08 12:51 ` Julia Lawall [this message]
2019-11-08 13:05   ` Markus Elfring

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=alpine.DEB.2.21.1911081350350.2465@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@systeme.lip6.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 NNTP newsgroup(s).