From 7e94a1d84d60791d2d1aeec73eae13d58120331f Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Fri, 6 May 2016 10:19:28 -0400 Subject: Added a clause about short functions --- docs/style-guide.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/style-guide.rst') diff --git a/docs/style-guide.rst b/docs/style-guide.rst index bc32f891..ef2c334f 100644 --- a/docs/style-guide.rst +++ b/docs/style-guide.rst @@ -482,6 +482,11 @@ No:: } } +When declaring short functions with a single statement, it is permissible to do it on a single line. + +Permissible:: + + function shortFunction() { doSomething(); } These guidelines for function declarations are intended to improve readability. Authors should use their best judgement as this guide does not try to cover all -- cgit