diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2017-08-14 19:58:06 +0300 |
---|---|---|
committer | Andrew Newdigate <andrew@gitlab.com> | 2017-08-14 19:58:06 +0300 |
commit | fa2e2aedf0119206a0b14b9c7b5e3e51855ad115 (patch) | |
tree | de874d032376cb757002c945e963d9c1647b3d7e /STYLE.md | |
parent | 48d4566794eba53ce4066aeaeb968949e9f18888 (diff) |
Test output cleanup, no naked returns
Diffstat (limited to 'STYLE.md')
-rw-r--r-- | STYLE.md | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -41,6 +41,17 @@ interpolating strings. The `%q` operator quotes strings and escapes spaces and non-printable characters. This can save a lot of debugging time. +## Return statements + +### Don't use "naked return" + +In a function with named return variables it is valid to have a plain +("naked") `return` statement, which will return the named return +variables. + +In Gitaly we don't use this feature. If the function returns one or +more values, then always pass them to `return`. + ## Tests ### Table-driven tests |