Create CONTRIBUTING.md

This commit is contained in:
László Monda
2017-06-15 23:52:27 +02:00
committed by GitHub
parent 41225b2042
commit bdb94ac0ca

View File

@@ -10,10 +10,15 @@
## Naming identifiers
Functions are written with UpperCamelCase and verb is followed by noun.
Extern functions and variables are written with UpperCamelCase, non-extern functions and variables are written with lowerCamelCase.
Function names are composed of a verb followed by a noun.
```
DoThis();
DoThisExtern();
doThisNonExtern();
uint8 ExternVariable;
uint8 nonExternVariable;
```
Whenever a file exposes a group of functions as a consistent API, their function names should be prefixed with the group name, followed by `_`, followed by the individual function names.
@@ -24,12 +29,6 @@ void LedDriver_WriteRegister(uint8_t i2cAddress, uint8_t reg, uint8_t val);
void LedDriver_SetAllLedsTo(uint8_t val);
```
Non-function scoped variables are written with UpperCamelCase.
```
uint8_t OuterVariable;
```
Function scoped variables and function parameters are written with lowerCamelCase.
```