From a6e9a10873eca5e97a77abab95622aa58e304787 Mon Sep 17 00:00:00 2001 From: Javier Spagnoletti Date: Thu, 23 Jul 2015 16:27:20 -0300 Subject: [PATCH] [2.3] [Contributing] Added note about empty returns | Q | A | ------------- | --- | Doc fix? | no | New docs? | no | Applies to | | Fixed tickets | --- contributing/code/standards.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contributing/code/standards.rst b/contributing/code/standards.rst index 2168129d7fa..97491888bc8 100644 --- a/contributing/code/standards.rst +++ b/contributing/code/standards.rst @@ -112,6 +112,9 @@ Structure * Add a blank line before ``return`` statements, unless the return is alone inside a statement-group (like an ``if`` statement); +* Use just ``return;`` instead of ``return null;`` when a function must return void + early; + * Use braces to indicate control structure body regardless of the number of statements it contains;