Re: [cocci] spatch #include statements and include search path

Jani Nikula
2025-01-14T17:45:33Z

On Mon, 13 Jan 2025, Julia Lawall <julia.lawall@inria.fr> wrote:
> On Mon, 13 Jan 2025, Jani Nikula wrote:
>
>> On Mon, 13 Jan 2025, Julia Lawall <julia.lawall@inria.fr> wrote:
>> > I don't think there is any search path for .cocci files.
>>
>> Oh, so it's always relative to the current working directory? That's a
>> bit of a bummer.
>
> It's not a well developed feature. If an include path for it would be
> useful, we can add that.

It might be. Or do you have any other ideas for reusing match rules or,
say, "iterator name" lists, without duplicating them into all .cocci
files?

So I guess I can try working around not having include search path by
running spatch outside of my kernel repo. Does spatch otherwise handle
that scenario well, or any caveats there?

BR,
Jani.

--
Jani Nikula, Intel