From 22e8d751f4234135ce374215539749325a16dca6 Mon Sep 17 00:00:00 2001 From: Phyma Date: Mon, 5 Jun 2017 11:42:31 +0200 Subject: [PATCH 1/2] Added more info about indentations, tabs and EditorConfig --- docs/wiki/development/coding-guidelines.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/wiki/development/coding-guidelines.md b/docs/wiki/development/coding-guidelines.md index 81cf20eff4a..1b7e18ec735 100644 --- a/docs/wiki/development/coding-guidelines.md +++ b/docs/wiki/development/coding-guidelines.md @@ -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 @@ -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. +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. Tabs or spaces are not allowed to trail on a line, last character needs to be non blank. Good: From 10d324c423ea27a42b6c2f749e965c1c1ad5f79c Mon Sep 17 00:00:00 2001 From: Phyma Date: Mon, 5 Jun 2017 12:17:35 +0200 Subject: [PATCH 2/2] Fixed original misspelling "Every" --- docs/wiki/development/coding-guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/wiki/development/coding-guidelines.md b/docs/wiki/development/coding-guidelines.md index 1b7e18ec735..79214e4ecdf 100644 --- a/docs/wiki/development/coding-guidelines.md +++ b/docs/wiki/development/coding-guidelines.md @@ -267,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. Tabs or spaces are not allowed to trail on a line, last character needs to be non blank. +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: