You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: project_and_code_guidelines.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -431,6 +431,24 @@ There are two __exceptions__ where is possible to have lines longer than 100:
431
431
432
432
There isn't an exact formula that explains how to line-wrap and quite often different solutions are valid. However there are a few rules that can be applied to common cases.
433
433
434
+
__Break at operators__
435
+
436
+
When the line is broken at an operator, the break comes __before__ the operator. For example:
437
+
438
+
```java
439
+
int longName = anotherVeryLongVariable + anEvenLongerOne - thisRidiculousLongOne
440
+
+ theFinalOne;
441
+
```
442
+
443
+
__Assignment Operator Exception__
444
+
445
+
An exception to the break at operators rule is the assignment operator `=`, where the line break should happen __after__ the operator.
When multiple methods are chained in the same line - for example when using Builders - every call to a method should go in its own line, breaking the line before the `.`
0 commit comments