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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# Requires clang-format-15+
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
Expand All @@ -10,7 +11,7 @@ AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: All
AlwaysBreakBeforeMultilineStrings: false
Expand Down Expand Up @@ -46,6 +47,7 @@ DerivePointerAlignment: false
IndentCaseLabels: false
IndentPPDirectives: None
IndentWidth: 4
InsertBraces: true
Comment thread
coderabbitai[bot] marked this conversation as resolved.
IndentWrappedFunctionNames: false
MaxEmptyLinesToKeep: 2
NamespaceIndentation: Inner
Expand Down
4 changes: 2 additions & 2 deletions docs/CodeStyle.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ limitations under the License.
}
```

* Short if-statements without else can be on single line when appropriate
* Empty functions/blocks can be on single line: `void empty() {}`
* Braces are **required** around every control statement (`if`/`else`/`for`/`while`/`do`).
* Empty functions/blocks can be on single line: `void empty() {}` / `while (poll()) {}`

### Switch Statements

Expand Down
Loading