diff --git a/doc/kotlin-coding-guideline.md b/doc/kotlin-coding-guideline.md index ec2f70c..13979fa 100644 --- a/doc/kotlin-coding-guideline.md +++ b/doc/kotlin-coding-guideline.md @@ -1,3 +1,22 @@ +# Kotlin Coding Guidelines + +## Code structure + +- short methods (not too long) + - add suggestion how to refactor + +- only one level of abstraction + keep only one abstraction level in method + +- keep low level of identation + less is more + for example when() if-else if-else is not very good redable + +- use variable for expression / condition + + +## Questions + ### `value.?let` or `if (value != null)` Is really better to use @@ -24,4 +43,3 @@ val value = object : Type { // implementation } ``` -