> Let us suppose that I want to suppress a couple of matches because they are
> false-positives.
Do you try to avoid the generation of false positives for your source code
analysis?
> However, I still want to check they exists in finalize block and print a
> warning otherwise.
> This is some kind of self-check for a rule.
I might stumble on understanding difficulties according to such a terse
description
of a software design goal.
> # Always prints []. Is it normal?
> #print(cocci.files())
* Are you looking for better documentation of this programming interface?
* Which information do you expect to be available in a SmPL initialisation rule?
> def relevant(p): # suppress functions from blacklist
…
> return False if blacklist & { el.current_element for el in p } else
> True # intersection
To which information should the variable “el” refer?
> @rp depends on patch@
> position p: script:python() { relevant(p) };
> @@
>
> - function1@p();
Can the use of a metavariable with the type “identifier” be eventually also
helpful?
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci