- Standard based on LLVM and defined in
.clang-formatin project root. Use clang-format as your code formatter, andmake lintto check for errors. - CosmOS is spelled CosmOS
- CosmOS uses Snake Case for function names
- Do not include header files from
/kernel/dev/. Instead, query the DeviceMgr for the appropriate device and use the abstract device API from/sys/deviceapi/
Configure VSCode to use the cLangFormat formatter, and file for style options, which will refer to .clang-format.
In settings.json:
{
// Coding style. Use "file" to load the style from a .clang-format file in the current or parent directory.
'C_Cpp.clang_format_style': 'file',
// Configures the formatting engine for clangFormat.
'C_Cpp.formatting': 'clangFormat',
// Format a file on save. Formatter must be available.
'editor.formatOnSave': true,
}