Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Contributing Guide | ||
|
||
## Issue contributions | ||
For either questions or bugs, submit a ticket for your issue, assuming one does | ||
not already exist. Try to: | ||
|
||
* Describe the issue including steps to reproduce when it is a bug. | ||
* Make sure you fill in the version that you are using. | ||
|
||
## Code contributions | ||
If you want to contribute, fork this project and make a pull request. Try to: | ||
|
||
* Write tests. | ||
* Follow our [coding guidelines][coding]. | ||
* Write a [good commit message][commit]. | ||
|
||
[coding]: doc/guides/coding-guidelines.md | ||
[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Coding guidelines | ||
|
||
## Names | ||
1. Use *DLB_PascalCase* for C interface function names. | ||
1. Use *snake_case* for function names. | ||
1. Use *snake_case* for local variables. | ||
1. Use *UPPER_CASE* for enum values. | ||
1. Use whole words in names when possible. | ||
|
||
## Style | ||
1. Use 4 spaces per indentation. | ||
1. Braces should start on the same line as the statement. | ||
1. Always surround loop and conditional bodies with curly braces. | ||
Statements on the same line are allowed to omit braces. | ||
1. Type names should (in general) be defined inside the scope that uses them. | ||
1. Error condition should be reported through return enum mechanism. | ||
|
||
## Functions | ||
1. Use static functions when possible. | ||
1. Do not export a symbol name if it does not belong to the interface. | ||
|
||
## Documentation | ||
1. Use doxygen to document all functions that belong to the interface. | ||
* A brief summary (one sentence) declaring the function main purpose | ||
(mandatory). | ||
* A list of parameters (with its type [in], [out] or [in,out]) including a | ||
short description (mandatory, if any). | ||
* The returning value of the function (mandatory, if non-void). | ||
* A more detailed function description (when needed). | ||
* A doxygen example: | ||
|
||
```c | ||
/*! \brief Brief function description | ||
*! \param[type] param1 Param 1 description | ||
*! \param[type] param2 Param 2 description | ||
*! \return Return value description | ||
*/ | ||
int DLB_Function(type1_t param1, type2_t, param2) { | ||
... | ||
} | ||
``` | ||
|
||
## License | ||
1. All files (sources, headers, scripts, ...) MUST have the proper license | ||
header | ||
|