Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer (GitLab) <jacob@gitlab.com>2017-08-14 19:58:06 +0300
committerAndrew Newdigate <andrew@gitlab.com>2017-08-14 19:58:06 +0300
commitfa2e2aedf0119206a0b14b9c7b5e3e51855ad115 (patch)
treede874d032376cb757002c945e963d9c1647b3d7e /STYLE.md
parent48d4566794eba53ce4066aeaeb968949e9f18888 (diff)
Test output cleanup, no naked returns
Diffstat (limited to 'STYLE.md')
-rw-r--r--STYLE.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/STYLE.md b/STYLE.md
index 4b8ccbfac..300dfa0ab 100644
--- a/STYLE.md
+++ b/STYLE.md
@@ -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