You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing edits, always respect the file template in .vscode/c.code-snippets.
6
+
There are separate templates for .h and .c files.
7
+
The templates contain sections.
8
+
Put the new code in the correct section of the file.
9
+
If a section is missing, add it.
10
+
Keep the sections in the order they are in the template.
11
+
After creating an empty file, add the appropiate template first.
12
+
Never put function definitions in header files. Only put function declarations in header files.
13
+
14
+
# About memory allocations
15
+
Never check if malloc(), calloc() or realloc() returned NULL. Assume that they always succeed. Do not add error handling for failed memory allocations.
16
+
17
+
# About comments
18
+
When creating a struct or enum, add doxygen comments to it.
19
+
When adding a function, add doxygen comments to the declaration in the header file (public function) or to the declaration in the source file, section "Private Function Declarations" (private function).
20
+
21
+
# About naming conventions
22
+
The naming convention for public functions is `moduleName_functionName` (implemented in moduleName.c).
23
+
functionName should be a verb describing the action of the function.
24
+
Use camel case for function names and variable names.
25
+
Use uppercase letters and underscores for macro names and enum values.
26
+
27
+
Do not use the ! operator for boolean conditions. Write condition == false instead.
28
+
Do not create functions, variables or defines that are not used.
29
+
Never declare multiple variables in the same line.
30
+
Make order of operations explicit with parentheses, even if they are not strictly necessary.
0 commit comments