Coccinelle
Dridi Boukelmoune
dridi at varni.sh
Wed Mar 27 09:55:34 UTC 2019
On Wed, Mar 27, 2019 at 8:38 AM Nils Goroll <slink at schokola.de> wrote:
>
> Re Dridi in 4edaa2836c6aba837899b78866a2567c704e336b:
>
> > Asking again, could we consider keeping Coccinelle patches around?
>
> I think it would make a lot of sense to automate coding conventions. Ideally,
> make check would fail if any of them are not met.
Since we have no Coccinelle expert in the team to my knowledge, I'd
rather start with having a collection of semantic patches available to
people (be it for in-tree or out-of-tree use). I know of other
projects failing their build on Coccinelle checks but I think it's a
premature discussion at this point.
> As I got zero experience with coccinelle my only concern would be how to mark
> exceptions. Is there anything similar to flexelint hints?
I don't know enough about that. I know you can define isomorphic
expressions so that you don't have to deal with differences like
if (ptr)
if (ptr != NULL)
if (!ptr)
if (ptr = NULL)
but regarding exceptions, I don't know.
> At any rate, +1 for adding the patches to the tree.
At the very least the semantic patches I wrote for Varnish are all
available on purpose in the commit log (when I considered them
relevant and was the one checking changes in).
git log --grep Coccinelle
3 patches are available as of today in the commit log so that shouldn't
be too intrusive.
Dridi
More information about the varnish-dev
mailing list