From 055fff834d98352eed56ccf4ee9e9bf6a5dc5a5b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 30 Sep 2003 17:26:29 +0000 Subject: new warning: N_("xxx") . "yyy" is dumb since the string "xxx" will never get translated --- perl_checker.src/parser_helper.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml index 69627e6..29bb971 100644 --- a/perl_checker.src/parser_helper.ml +++ b/perl_checker.src/parser_helper.ml @@ -596,6 +596,9 @@ let cook_call_op op para pos = warn_rule "don't do this" else if List.exists (function Num _ -> true | _ -> false) para then warn_rule (sprintf "you should use a number operator, not the string operator \"%s\" (or replace the number with a string)" op) + | "." -> + if List.exists (function Call(Deref(I_func, Ident(None, "N_", _)), _) -> true | _ -> false) para then + warn_rule "N_(\"xxx\") . \"yyy\" is dumb since the string \"xxx\" will never get translated" | "||=" | "&&=" -> (match List.hd para with | List [ List _ ] -> warn_rule "remove the parentheses" -- cgit v1.2.1