cocci: simplify check for trivial format strings
authorRené Scharfe <l.s.r@web.de>
Thu, 1 Feb 2018 18:56:34 +0000 (19:56 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 2 Feb 2018 22:30:12 +0000 (14:30 -0800)
commitae239fc8e57a5758e9db63c0bceaca933d217f81
treefd344617b192762a2ae85ac84e3878f73848b447
parent8279ed033f703d4115bee620dccd32a9ec94d9aa
cocci: simplify check for trivial format strings

353d84c537 (coccicheck: make transformation for strbuf_addf(sb, "...")
more precise) added a check to avoid transforming calls with format
strings which contain percent signs, as that would change the result.
It uses embedded Python code for that.  Simplify this rule by using the
regular expression matching operator instead.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/coccinelle/strbuf.cocci