Thanks for your interest in contributing to Neura project!
Please follow the steps below:
- Raise an issue on the problems/freatures you try to solve/add.
- Finish coding and add corresponding tests.
- Submit a pull request and require review from other contributors.
- Merge into the
mainbranch.
We follow LLVM style. The format configuration is in the .clang-format file
at the repo root — all tools below read it automatically.
You can choose one of the two options listed below for code formatting.
- Install the following extensions:
- clangd — C/C++ language server and formatter.
- Add the following to your workspace or user
settings.json(Ctrl+Shift+P→Preferences: Open Workspace Settings (JSON)):
{
"[c]": {
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd",
"editor.formatOnSave": true
},
"[cpp]": {
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd",
"editor.formatOnSave": true
}
}clangd automatically picks up .clang-format from the repo root, so no
additional style configuration is needed.
If you use the
ms-vscode.cpptoolsextension instead of clangd, set"C_Cpp.clang_format_style": "file"so it reads.clang-formatrather than using a hard-coded style.
Before submitting a patch, format your changed lines against main:
# Format only the lines changed relative to main (recommended before commit).
$ git clang-format main
# Preview the diff without touching files.
$ git clang-format --diff main
# Restrict to specific directories.
$ git clang-format main -- lib/ tools/If you need to reformat the entire codebase (e.g., after changing .clang-format):
git ls-files | grep -E '\.(c|cc|cpp|cxx|h|hh|hpp|hxx|inc|td)$' | xargs -r clang-format -i