Skip to contentSkip to conversation

Restricting information search for header files

cocci Markus Elfring 2 participants 5 messages Nov 9, 2025

lore
Share & tools
lore
#1 lore raw
Quoted 10 lines · Markus Elfring

Hello,

I would like to extract some information also from header files. It would be nice if a file search can be restricted accordingly.

Some information was provided for the clarification approach “Source code analysis for header files”.
https://lore.kernel.org/cocci/alpine.DEB.2.10.1501071549410.3328@hadrien/

Did interests evolve any further also for such a development topic?

You can also use script code to exit if the file name is not suitable.

julia

#2 lore raw
Quoted 6 lines
Quoted 5 lines

Some information was provided for the clarification approach “Source code analysis for header files”.
https://lore.kernel.org/cocci/alpine.DEB.2.10.1501071549410.3328@hadrien/

Did interests evolve any further also for such a development topic?

You can also use script code to exit if the file name is not suitable.

Would this programming interface mean that the parameter “--include-headers” should be passed to the program “spatch” before?
https://gitlab.inria.fr/coccinelle/coccinelle/-/blob/e6f8731b851f5d76d2731a9d546dc4f0b181526e/docs/Coccilib.3cocci#L253-259
https://gitlab.inria.fr/coccinelle/coccinelle/-/blob/e6f8731b851f5d76d2731a9d546dc4f0b181526e/docs/manual/cocci-python.txt#L39-40

Will related system configuration options become more interesting?

Regards,
Markus

#3 lore raw

If you don’t use include headers they will not be included in the file list, only included from other files. Sent from my iPhone

Quoted 20 lines · Markus Elfring



Quoted 7 lines
Quoted 6 lines

Some information was provided for the clarification approach “Source code analysis for header files”.
https://lore.kernel.org/cocci/alpine.DEB.2.10.1501071549410.3328@hadrien/

Did interests evolve any further also for such a development topic?

You can also use script code to exit if the file name is not suitable.

Would this programming interface mean that the parameter “--include-headers” should be passed to the program “spatch” before?
https://gitlab.inria.fr/coccinelle/coccinelle/-/blob/e6f8731b851f5d76d2731a9d546dc4f0b181526e/docs/Coccilib.3cocci#L253-259
https://gitlab.inria.fr/coccinelle/coccinelle/-/blob/e6f8731b851f5d76d2731a9d546dc4f0b181526e/docs/manual/cocci-python.txt#L39-40

Will related system configuration options become more interesting?

Regards,
Markus

#4 lore raw
Quoted 1 line

If you don’t use include headers they will not be included in the file list, only included from other files.

Thanks for another bit of information.

A file filter is already applied then.
Would it be more efficient to exclude undesirable (or unsupported) input files also by corresponding system configuration parameters?

How many additional data processing resources would be needed for the evaluation of a final function call like “cocci.exit()” by an SmPL rule script?

Regards,
Markus