Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 2 additions & 17 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
Expand All @@ -20,24 +21,8 @@ AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterCaseLabel: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: true
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
Expand Down
8 changes: 6 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,16 @@ branch or worktree when the existing checkout contains uncommitted changes.
a top-level application source directory or split source headers into include/. Retain the current `app` CMake target and the
`app`/`app_d` executable names.
- Follow `.clang-format` and the repository formatting scripts with clang-format
18. Keep function opening braces on the declaration line, expand short function
bodies, and use braces for control statements.
18. Use attached opening braces for classes, structs, enums, unions, functions,
namespaces and control statements (`class example {`, `if (ready) {`). Keep
`} else {` and `} catch (...) {` together. Expand short function, enum and
control bodies, and use braces for control statements.
- Group includes as system, third-party, then project headers. Keep required
platform-header dependencies in a valid order. Separate include blocks,
namespaces and adjacent definitions with the prescribed blank lines.
- Run `CLANG_FORMAT=/path/to/clang-format bash scripts/format.sh --check`.
- Include first-party native tools in the same formatting scope as core, plugins,
examples and tests; do not leave the Entity exporter outside the check.
- The formatter selects Git-tracked files. Stage intended new C++ files before
running it, or format those paths explicitly. Run the complete check again
after committing so newly tracked tests and headers cannot escape validation.
Expand Down
Loading
Loading