Re: [Cocci] Searching only for header files with the Coccinelle software

2021-03-28 Thread Julia Lawall


On Sun, 28 Mar 2021, Markus Elfring wrote:

> > 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.
>
> How are the chances to add support for another program option like 
> “--find-headers”?

In the last 15 years I have never wanted to do this.  And we already have
a huge number of command line options, so I'm not going to add this.

julia

>
> Will any other file filters become also relevant here?
>
> Regards,
> Markus
>___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Searching only for header files with the Coccinelle software

2021-03-28 Thread Julia Lawall


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___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


[Cocci] Searching only for header files with the Coccinelle software

2021-03-28 Thread Markus Elfring
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?

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