From: Michael J Gruber <git@drmicha.warpmail.net>
To: git@vger.kernel.org
Subject: [RFC PATCH 3/5] error/warning framework framework: coccinelli rules
Date: Mon, 2 Jan 2017 12:14:52 +0100 [thread overview]
Message-ID: <da98fec6fa421be916f169ef62353339c4273e89.1483354746.git.git@drmicha.warpmail.net> (raw)
In-Reply-To: <cover.1483354746.git.git@drmicha.warpmail.net>
Provide coccinelli rules which check for error(), warning() etc. with
localised argument and create a patch to replace them with error_(),
warning_() etc. in order to fully localize them.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
contrib/coccinelle/errorl10n.cocci | 47 ++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 contrib/coccinelle/errorl10n.cocci
diff --git a/contrib/coccinelle/errorl10n.cocci b/contrib/coccinelle/errorl10n.cocci
new file mode 100644
index 0000000000..d62a440644
--- /dev/null
+++ b/contrib/coccinelle/errorl10n.cocci
@@ -0,0 +1,47 @@
+@@
+expression E;
+@@
+- usage(_(E));
++ usage_(_(E));
+
+@@
+expression E;
+@@
+- usagef(_(E));
++ usagef_(_(E));
+
+@@
+expression E;
+@@
+- die(_(E));
++ die_(_(E));
+
+@@
+expression E;
+@@
+- error(_(E));
++ error_(_(E));
+
+@@
+expression E;
+@@
+- warning(_(E));
++ warning_(_(E));
+
+@@
+expression E;
+@@
+- die_errno(_(E));
++ die_errno_(_(E));
+
+@@
+expression E;
+@@
+- error_errno(_(E));
++ error_errno_(_(E));
+
+@@
+expression E;
+@@
+- warning_errno(_(E));
++ warning_errno_(_(E));
--
2.11.0.372.g2fcea0e476
next prev parent reply other threads:[~2017-01-02 11:15 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-02 11:14 [RFC PATCH 0/5] Localise error headers Michael J Gruber
2017-01-02 11:14 ` [RFC PATCH 1/5] error/warning framework: prepare for l10n Michael J Gruber
2017-01-02 11:14 ` [RFC PATCH 2/5] error/warn framework: provide localized variants Michael J Gruber
2017-01-02 11:14 ` Michael J Gruber [this message]
2017-01-03 12:26 ` [RFC PATCH 0/5] Localise error headers Duy Nguyen
2017-01-03 19:45 ` Stefan Beller
2017-01-04 13:25 ` Duy Nguyen
2017-01-07 9:34 ` Duy Nguyen
2017-01-04 7:05 ` Jeff King
2017-01-09 12:43 ` Michael J Gruber
2017-01-10 9:04 ` Jeff King
2017-01-10 18:28 ` Stefan Beller
2017-01-11 11:37 ` Jeff King
2017-01-11 17:15 ` Stefan Beller
2017-01-21 14:24 ` Jeff King
2017-01-11 18:08 ` Junio C Hamano
2017-01-20 13:08 ` Duy Nguyen
2017-01-21 14:19 ` Jeff King
2017-01-21 14:20 ` Jeff King
2017-03-30 15:18 ` Michael J Gruber
2017-04-01 8:12 ` Jeff King
2017-04-01 17:38 ` Junio C Hamano
2017-01-20 13:23 ` Duy Nguyen
2017-01-20 13:31 ` Duy Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=da98fec6fa421be916f169ef62353339c4273e89.1483354746.git.git@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).