git-commit-vandalism/contrib/coccinelle
René Scharfe cd9a4b6d93 cocci: use format keyword instead of a literal string
There's a rule in strbuf.cocci for converting trivial uses of
strbuf_addf() to strbuf_addstr() in order to simplify the code and
improve performance a bit.  Coccinelle 1.0.0~rc19.deb-3 on Travis CI
lets the "%s" in that rule match format strings like "%d" as well for
some reason, though, leading to invalid proposed patches.

Use the "format" keyword to let Coccinelle parse the format string and
match the conversion specifier with a trivial regular expression
instead.  This works fine with both Coccinelle 1.0.0~rc19.deb-3 and
1.0.4.deb-3+b3 (the current version on Debian testing).

Reported-by: SZEDER Gábor <szeder.dev@gmail.com>
Tested-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-19 11:27:14 -08:00
..
.gitignore gitignore: ignore output files of coccicheck make target 2016-09-27 14:02:19 -07:00
array.cocci coccinelle: remove parentheses that become unnecessary 2017-10-02 13:02:26 +09:00
free.cocci coccinelle: polish FREE_AND_NULL rules 2017-06-29 10:46:16 -07:00
object_id.cocci cocci: avoid self-references in object_id transformations 2016-11-01 10:58:39 -07:00
qsort.cocci remove unnecessary check before QSORT 2016-09-29 15:42:18 -07:00
README contrib/coccinelle: add basic Coccinelle transforms 2016-06-28 11:39:02 -07:00
strbuf.cocci cocci: use format keyword instead of a literal string 2018-01-19 11:27:14 -08:00
swap.cocci add SWAP macro 2017-01-30 14:07:45 -08:00
xstrdup_or_null.cocci abspath: add absolute_pathdup() 2017-01-26 14:51:06 -08:00

This directory provides examples of Coccinelle (http://coccinelle.lip6.fr/)
semantic patches that might be useful to developers.