From f0944525261b4aaed0fbfe6b0d7de622b2a935c7 Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Fri, 23 Mar 2012 08:34:09 +0100 Subject: [PATCH] Added syntax-check rule for return with parentheses After cleanup introduced with previous commit, there is a need for syntax-check rule taking care of return(). Regexp used in 'prohibit' parameter is taken from the cleanup commit and modified so it fits 'grep -E' format. Semicolon at the end is needed, otherwise the regexp could match return with cast. Exception is created for python source files because we don't have any documentation restricting the use of return that matches this case. --- cfg.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cfg.mk b/cfg.mk index 24e6a69845..c3de533855 100644 --- a/cfg.mk +++ b/cfg.mk @@ -469,6 +469,12 @@ sc_prohibit_xmlURI: halt='use virURI(Parse|Format), not xml(ParseURI|SaveUri)' \ $(_sc_search_regexp) +# we don't want old old-style return with parentheses around argument +sc_prohibit_return_as_function: + @prohibit='\