-
Notifications
You must be signed in to change notification settings - Fork 3
Codestyle Guidelines
Smilla Fox edited this page May 28, 2021
·
12 revisions
- code and comments always in English
- class comments document all instance and class attributes
- test code is also code! (guidelines also apply here)
- package: IMAPClient
- categories: IMAPClient-Core, IMAPClient-Tests
- prefix: IC
- as few points as possible
- no points at the end of a method
- if one statement write everything in one line
- opening bracket in one line, then a new line, closing bracket at the end of statement
- new line after reciever of cascade
- empty line after the method signature
- whitespace before and after every binary operator; e.g.:
(a + b) * c, z @ c
- NO whitespace between two brackets
for example:
[[:sig | self inform: sig] on: Error do: self destruct]
- NO whitespace before and after all brackets
(self isTrue)
- camelCase for variables, methods and parameters
- first letter uppercase for class names and categories
just don't write them
- if you really really really need a comment: single line with comment only