Skip to content

Commit

Permalink
Added more info about indentations, tabs and EditorConfig (#5249)
Browse files Browse the repository at this point in the history
* Added more info about indentations, tabs and EditorConfig

* Fixed original misspelling "Every"
  • Loading branch information
Phyma authored and bux committed Jun 5, 2017
1 parent cec82be commit 7141bbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/wiki/development/coding-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ Exceptions:

## 5. Code Style

To help with some of the coding style we recommend you get the plugin [EditorConfig](http://editorconfig.org/#download) for your editor. It will help with correct indentations and deleting trailing spaces.

### 5.1 Braces placement

Braces `{ }` which enclose a code block will have the first bracket placed behind the statement in case of `if`, `switch` statements or `while`, `waitUntil` & `for` loops. The second brace will be placed on the same column as the statement but on a separate line.

- Opening brace on the same line as keyword
Expand Down Expand Up @@ -264,7 +267,7 @@ class Three {foo = 3;};
Putting the opening brace in its own line wastes a lot of space, and keeping the closing brace on the same level as the keyword makes it easier to recognize what exactly the brace closes.
### 5.2 Indents
Ever new scope should be on a new indent. This will make the code easier to understand and read. Indentations consist of 4 spaces. Tabs are not allowed.
Every new scope should be on a new indent. This will make the code easier to understand and read. Indentations consist of 4 spaces. Tabs are not allowed. Tabs or spaces are not allowed to trail on a line, last character needs to be non blank.
Good:
Expand Down

0 comments on commit 7141bbc

Please sign in to comment.