cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Searching only for header files with the Coccinelle software
Date: Sun, 28 Mar 2021 11:27:57 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2103281125350.2854@hadrien> (raw)
In-Reply-To: <0e878958-6245-a3b2-b892-5b67b1cb598f@web.de>

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



On Sun, 28 Mar 2021, Markus Elfring wrote:

> Hello,
>
> The Coccinelle software can search for header files in addition to source files
> if the option “--include-headers” was specified.
> https://github.com/coccinelle/coccinelle/blob/287374196da8c7cfd169e721a2d23f1e462422f1/docs/manual/spatch_options.tex#L43
>
> How can it be achieved that only header files will be searched by this tool
> for special source code analysis and transformation approaches?

Probably the simplest is to put the names of the header files in a file,
eg find . -name "*h" > header_list, and then give the arguement
--file-groups header_list to Coccinelle.

Another option is to use python in te semantic patch to detect the current
file and then abort if it doesn't end in .h.  But that would be much
slower because the undesired files would still be parsed.

julia

[-- 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:[~2021-03-28  9:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-28  6:15 [Cocci] Searching only for header files with the Coccinelle software Markus Elfring
2021-03-28  9:27 ` Julia Lawall [this message]
     [not found]   ` <30240b24-99e5-eafb-c167-777ca1a6ec59@web.de>
2021-03-28 10:48     ` Julia Lawall

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.22.394.2103281125350.2854@hadrien \
    --to=julia.lawall@inria.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).