... | ... | @@ -577,10 +577,7 @@ void os_system_config__shutdown(os_system__shutdown_reason_e shutdown_reason) { |
|
|
(void)shutdown_reason; //TODO: Need to update shared ram
|
|
|
}
|
|
|
```
|
|
|
|
|
|
# Expressive Code
|
|
|
|
|
|
## Balance the length of the names
|
|
|
## Balanced length for variables
|
|
|
Keep a balance between variable length and making the intent clear.
|
|
|
|
|
|
* Code completion can help
|
... | ... | @@ -686,7 +683,6 @@ void my_module__perform_operation(); |
|
|
void my_module__update_info();
|
|
|
```
|
|
|
|
|
|
|
|
|
## Use Relative Includes
|
|
|
|
|
|
Shown below are two ways to include a code module. We recommend going with Option 1 for the reasons mentioned below.
|
... | ... | @@ -705,7 +701,7 @@ Shown below are two ways to include a code module. We recommend going with Optio |
|
|
* Our code modules have layer names, and the chance of conflict are minimal .i.e: `sl_common.h`
|
|
|
* One time software integration offsets the cost of relative includes
|
|
|
----
|
|
|
# Structure
|
|
|
# Software Layering
|
|
|
|
|
|
## Whitespace & Code Format
|
|
|
Newer languages like Golang have whitespace rules, such as the brace positions built into the language. We chose to implement same idea by using `clang-format`, which auto formats the source code according to pre-set rules such that **we focus our code reviews on the actual matter, and not the code format**.
|
... | ... | |