8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25450cb commit 8bcfe71Copy full SHA for 8bcfe71
_style/indentation.md
@@ -11,19 +11,25 @@ previous-page: overview
11
next-page: naming-conventions
12
---
13
14
-Indentation should follow the "2-space convention". Thus, instead of
+Each level of indentation is 2 spaces. Tabs are not used. Thus, instead of
15
indenting like this:
16
17
// wrong!
18
class Foo {
19
- def bar = ...
+ def fourspaces = {
20
+ val x = 4
21
+ ..
22
+ }
23
}
24
25
You should indent like this:
26
27
// right!
28
- def bar = ..
29
+ def twospaces = {
30
+ val x = 2
31
32
33
34
35
The Scala language encourages a startling amount of nested scopes and
0 commit comments