The standard indention level is 3 and indentation should be done with spaces.
if (true) {
val foo = ...
...
}
Brackets should only be used when a block is required. If the block can be replaced by a single expression, the single expression is preferred.
The following forms for if
statements are acceptable:
if (cond)
expressionOne
else
expressionTwo
if (cond) expressionOne else expressionTwo
The "has type" operator :
is always preceded and followed by one space.