This is the style guide of the codin compiler.
- C11
- Types
PascalCase
- Functions
snake_case
- Constants
TITLECASE
- Soft 80-column limit
- Indent with tabs
- Align with spaces
- Assume allocations can fail and handle accordingly
- Put space between
if
,switch
, andfor
and the expression - The bracing style looks like (1TBS)
if (x) { } else { }
- Put case statements on the same column of switch
switch (x) { case A: foo(); break; case B: bar(); break; }
- Every statement should have
{}
- Do not put
()
onsizeof
operator unless needed - Do not put
()
onreturn
- No dependencies