Re: [cocci] Reacting to negative source code search results with SmPL?

Markus Elfring <[email protected]>
Newsgroups fr.inria.cocci
Message-ID <[email protected]>
> I constructed the following SmPL script variant for further development considerations.

Another SmPL script example:
@initialize:python@
@@
def my_notification1(id):
   print(f"The call “{id}” was found.");

def my_notification2():
   print("An undesirable function call was not found.");

@my_test_search1@
identifier action;
@@
 action(123);

@script:python reporting1@
id << my_test_search1.action;
@@
my_notification1(id)

@my_test_search2@
id << my_test_search1.action;
@@
 action(456);

@script:python reporting2 depends on ! my_test_search2@
@@
my_notification2()



How will chances evolve for further software improvements?

Regards,
Markus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.