Willy,
[Dropping Christopher from Cc]
On 3/9/22 08:11, Willy Tarreau wrote:
As for the second CLEANUP commit: If one of you knows how to fix the Coccinelle
patch to detect that specific pattern, I'd appreciate if you could make the
necessary changes to ist.cocci. Unfortunately my Coccinelle skills are not
good enough.
I've already faced this situation where it didn't find fields of a given
type inside a structure, and I stopped searching when I figured that by
the time I would finally find, I could have replaced 10 times the 3
occurrences I needed. I essentially use Coccinelle as a helpful tool to
save me time, and I can't resolve myself to spend more time trying to
write unmaintainable scripts that will never be reused. A good source of
inspiration are the scripts in the linux kernel, but those are often of
an extreme level of complexity and mix python scripting within the patch,
resulting in me not understanding anything anymore. But some of them are
still human-readable or at least show the syntax hacks you're looking for.
Yeah, I've attempted to look into the Coccinelle patches in the Linux
kernel sources, but I agree that many of those are very complex :-)
Do you happen to know where we could ask for assistance with making the
necessary adjustments to the patches? Or perhaps you could ask and
include me in Cc, at least people already know you. I'll be happy to
further improve the existing Coccinelle patches and to further 'ist'ify
the codebase, but would need some handholding to get me started.
Best regards
Tim Düsterhus