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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2020-03-20 09:43:17 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2020-03-24 16:57:02 +0300
commit6b2a9261801d52735620da070e96bb820ca9cedd (patch)
treef722c9981db0ee5c1e4eae6f96fb0cbc785f634e /STYLE.md
parent7c9923ff9202b3ad8f5629169748955a73c24145 (diff)
STYLE.md: Add a note on ordering of types
Types should be declared before their first. Let's document this in our style guide.
Diffstat (limited to 'STYLE.md')
-rw-r--r--STYLE.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/STYLE.md b/STYLE.md
index bf2dae5dd..0d0beece0 100644
--- a/STYLE.md
+++ b/STYLE.md
@@ -52,6 +52,12 @@ variables.
In Gitaly we don't use this feature. If the function returns one or
more values, then always pass them to `return`.
+## Ordering
+
+### Declare types before their first use
+
+A type should be declared before its first use.
+
## Tests
### Table-driven tests