Skip to content

Commit

Permalink
Update styleguide.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivenjs authored Jul 12, 2024
1 parent e11f544 commit a48c0d7
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions styleguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ Hier finden Sie sämtliche Dokumentation für den Codestyle des SWT-Projekts Squ

```smalltalk
MethodName
| y |
(true or: [false not] or: [nil isNil])
ifFalse: [self halt].
y := self size + super size.
{$a . #a . 'a’ . 1 . 1,0}
do: [:each | Transcript
show: each class name;
show: each printString;
show: ' '].
^ x < y
| y |
(true or: [false not] or: [nil isNil]) ifFalse: [self halt].
y := self size + super size.
{$a . #a . 'a’ . 1 . 1,0}
do: [:each | Transcript
show: each class name;
show: each printString;
show: ' '].
^ x < y
```

## Naming
Expand Down Expand Up @@ -91,7 +90,19 @@ y := self size + super size.
8. Indent, align nested continuation lines **consistently**

9. **Embrace Oneliners** and avoid to break them across lines
10. Use
10. if-statements: Use indentation only if statement becomes to long or when you have branching paths
```smalltalk
aFirstBool ifTrue: [doSomething].
anObject isNil
ifFalse: [doSomething]
ifTrue: [doSometingElse].
VS.
aFirstBool
ifTrue: [doSomething].
anObject isNil ifFalse: [doSomething]
ifTrue: [doSometingElse].
```
11. Use
INDENTATION
für Abgrenzung im logischen Fluss
12. **AVOID** line wraps
Expand All @@ -107,10 +118,10 @@ y := self size + super size.
VS.
self label: self model label.
self minimumSize: 35 @ 7.
self when: #reactive perform: #reactiveWindow:.
self when: #reactive perform: #reactiveWindow:
```
17. NEW LINES
for ever
for every
new statement

20. **60 Character** Code Line Width (Window Width)

0 comments on commit a48c0d7

Please sign in to comment.