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