clang-format and checked by clang-tidy. Lua and SQL conventions are followed by convention.
- C++
- Lua
- SQL
C++ Style
The project targets C++20 and uses a style based on WebKit with Allman braces. The canonical configuration lives in.clang-format at the repository root and is compatible with clang-format-20.Key rules
| Rule | Value |
|---|---|
| Brace style | Allman (braces on their own line) |
| Indent width | 4 spaces |
| Tabs | Never — spaces only |
| Column limit | 0 (use your best judgement) |
| Pointer alignment | Left (int* ptr) |
| Standard | Latest (C++20) |
| Short blocks/ifs/loops on one line | Never |
| Template declarations | Always break before < |
| Include sorting | Enabled |
| Consecutive alignment | Assignments, declarations, and macros are aligned |
Allman brace example
Access modifiers
Access modifiers (public:, private:, protected:) use an offset of -4 so they sit flush with the class body rather than indented.Running clang-format
clang-tidy checks
The.clang-tidy configuration enables a focused set of checks: