Skip to content

Commit a3b2adb

Browse files
author
Frotty
committed
some more fixes
1 parent 9e87d6c commit a3b2adb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

_doc/manual/conventions.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ In general, the contents of a class are sorted in the following order:
3434

3535
Do not sort the function declarations alphabetically, and do not separate regular functions from extension methods. Instead, put related stuff together, so that someone reading the class from top to bottom would be able to follow the logic of what's happening. Choose an order (either higher-level stuff first, or vice versa) and stick to it. The API of a package should be at the top, immediately visible once opening it, including a hot doc description.
3636

37-
Put nested classes next to the code that uses those classes. If the classes are intended to be used externally and aren't referenced inside the class, put them in the end, after the companion object.
37+
Put nested classes next to the code that uses those classes. If the classes are intended to be used externally and aren't referenced inside the class, put them in the end.
3838

39-
#### Interface implementation
39+
#### Interface implementation
4040

4141
When implementing an interface, keep the implementing members in the same order as members of the interface (if necessary, interspersed with additional private methods used for the implementation)
4242

@@ -80,7 +80,7 @@ Put spaces around binary operators (`a + b`).
8080

8181
Do not put spaces around unary operators (`a++`)
8282

83-
Put spaces between control flow keywords (`if`, `switch`, `for` and `while`) and the corresponding opening parenthesis.
83+
Put single spaces between control flow keywords (`if`, `switch`, `for` and `while`) and the following expression. Do not use parenthesis unless it improves the readability of big bool terms.
8484

8585
Do not put a space before an opening parenthesis in a method declaration or method call.
8686

@@ -106,11 +106,11 @@ As a general rule, avoid horizontal alignment of any kind. Renaming an identifie
106106
In lambda expressions, spaces should be used around the `begin` and `end` keywords, as well as around the arrow which separates the parameters from the body. If a call takes a single lambda, it should be passed outside of parentheses whenever possible. Prefer putting lambda parameters as the last argument, so it can be written without `begin` and `end`.
107107

108108
```wurst
109-
list.filter(t -> t > 10)
109+
list.filter(t -> t > 10)
110110
111-
execute() ->
112-
hash = hash()
113-
```
111+
execute() ->
112+
hash = hash()
113+
```
114114

115115
### Documentation comments (hot doc)
116116

@@ -149,4 +149,4 @@ When making a choice between a complex expression using multiple higher-order fu
149149
Prefer test driven development if the feature is not too dependent on wc3 game mechanics. Create small, self-contained functions, annotate them with `@Test` individually and give them a descriptive name.
150150
Make sure to have at least one **assertion** inside your test to verify the behavior.
151151

152-
Tests should either be placed at the end of a package, or into a separate package suffixed `Tests` which will be ignored for autocomplete suggestions. Code and Tests should not be mixed.
152+
Tests should either be placed at the end of a package, or into a separate package suffixed `Tests` which will be ignored for autocomplete suggestions. Code and Tests should not be mixed.

0 commit comments

Comments
 (0)