On Fri, 14 Oct 2016, SF Markus Elfring wrote:
> I came during my software development activities along a few Linux source
> where I got an advice by the script "checkpatch.pl" like the following.
> WARNING: Prefer seq_puts to seq_printf
> Joe Perches pointed out that the function "seq_putc" would be more appropriate
> at a specific source code place.
> Now I am curious on how good the semantic patch language is applicable
> for advanced source code transformations in similar use cases.
> With which metavariables and corresponding programming interfaces can strings
> are passed to such functions be checked in more detail by the Coccinelle
The simplest would be to use python or ocaml code to make the checks that
are needed. You can use cocci.include_match(False) in python or
Coccilib.include_match false in ocaml when your test detects that
something is not suitable. coccinelle/demos/first.cocci may be helpful.
Cocci mailing list