From 8bcfe7133c5b63a85c0b72a063ee64a68dd237aa Mon Sep 17 00:00:00 2001 From: Martijn Hoekstra Date: Tue, 26 Jun 2018 11:00:54 +0200 Subject: [PATCH] Be clearer around indentation Add an extra level of indentation for demonstration purposes, and clarify language --- _style/indentation.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/_style/indentation.md b/_style/indentation.md index c378957e17..247c07bb05 100644 --- a/_style/indentation.md +++ b/_style/indentation.md @@ -11,19 +11,25 @@ previous-page: overview next-page: naming-conventions --- -Indentation should follow the "2-space convention". Thus, instead of +Each level of indentation is 2 spaces. Tabs are not used. Thus, instead of indenting like this: // wrong! class Foo { - def bar = ... + def fourspaces = { + val x = 4 + .. + } } You should indent like this: // right! class Foo { - def bar = .. + def twospaces = { + val x = 2 + .. + } } The Scala language encourages a startling amount of nested scopes and