- File Names are to be written in
CamelCase
(akaupper camel case
orPascalCase
).
This rule must be applied for any files withinsrc
, accept for the master file "kLibInfo"
- Class names within files are always to be written in
CamelCase
(akaupper camel case
orPascalCase
).
-
Normal Functions
Names must be written incamelCase
(akalower camel case
). -
DSL Functions
Names of functions forming a DSL may be written inCamelCase
(akaupper camel case
orPascalCase
) rather thencamelCase
(akalower camel case
).
Run the kotlin linter Process (make lint) to make sure you have a correct code syntax.
Make sure to have the linter by running ./scripts/get_ktlint.sh
-
In this project we use the programming language
Kotlin
and NO OTHER. -
In this project we use the language
English
(EN, EN_US) and NO OTHER.
- In this project we use LF (Unix) File endings and NO OTHER.
-
Opening Parentheses (
{
) always are to be positioned at the line definition lines of Functions and (any kind of) Classes. -
Closing Parentheses (
}
) are to be placed normally at the end of a block at the correct indent position. -
()
Parentheses may only be multi-lined of the content exceeds the Width of your monitor and/or makes the code more readable.
-
Declarative comments must be written above of Functions giving at least insights about Parameter and Return Types (Used for Dokka).
-
Comments are only required of the Code does NOT speak for itself (accept in case of rule 1).
- If possible, do not use
var
.
- Names are to be kept meaning full:
annotations
(Contains Annotations),functions
(Contains Top-Level functions)
-
Names are to be kept meaning gull:
ByteArray
(in extensions; Contains ByteArray extensions),ArrayWord
(in extensions; ContainsArray<Word>
extensions) -
If a File is created for a type generic context, the
<>
are to be removed:Array<Word>
=>ArrayWord
.
However if no Type is used, no text is given:Array<*>
=>Array
-
Signing Commits
Each and every commit must be signed with a valid PGP key or sub key. The used Key MUST use the same Email and Name as the committing Author. -
Clear descriptions
Each and every commit must have a simple summery in the first line of the commit message. A commit message shall also include a more detailed summery of what changed in the commit. -
Simple Commits
Each and every commit shall be kept simple. Performing big changes (like adding multiple standalone Interfaces) shall be put in multiple commits. -
Licensing
With any commit given by any Author his or her changes are going to be distributed under the Terms of our License. The Author accepts our license by submitting a commit to us.
-
Naming
Each and every pull request shall have a clear and simple name stating the proposed changes. -
Description
Each and every pull request shall have a summery of changes, a reason why these changes where made and if possible a connected Issue listed. -
Approval
Each and every pull request must be approved by the core team. Only with approval by at least 2 core team members (if possible) the current Project Manager is allowed to pull changes into the main development branch (master).