Re: coccinelle: adjustments for array.cocci?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 13, 2019, 02:11 UTC
- Message-ID
- <xmqqa790cyp1.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <5189f847-1af1-f050-6c72-576a977f6f12@web.de>
René Scharfe <l.s.r@web.de> writes:
> This reduces duplication in the semantic patch, which is nice. I think
> I tried something like that at the time, but found that it failed to
> produce some of the cases in 921d49be86 ("use COPY_ARRAY for copying
> arrays", 2019-06-15) for some reason.Thanks for mentioning.
I too recall that seemingly redundant entries were noticed during the review and at least back then removing the seemingly redundant ones caused failures in rewriting.
That is why I am hesitant to touch any patch that says "simplify cocci rule" making it sound as if simplification is a good thing on its own. I have no problem with "we change the rule this way, which eliminates this false positive / negative, that is demonstrated in the added tests in t/ directory", though.
Thanks.