-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clang-format
More file actions
59 lines (50 loc) · 1.39 KB
/
.clang-format
File metadata and controls
59 lines (50 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
BasedOnStyle: Chromium
Language: Cpp
Standard: c++20
IndentWidth: 4
ColumnLimit: 100
AlignAfterOpenBracket: BlockIndent # Break after { in a multi-line block
InsertBraces: true # Insert {} around single-line blocks
InsertTrailingCommas: Wrapped
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: MultiLine
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: true
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
# Disallow multiple elements on a single line (when multi-line is enabled)
BinPackArguments: false
BinPackParameters: false
PointerAlignment: Right
ReferenceAlignment: Right
# Group includes
IncludeBlocks: Regroup
IncludeCategories:
- Regex: "^<.*/.*"
Priority: 1
- Regex: "^<.*"
Priority: 2
- Regex: ".*"
Priority: 3
# Disallow single-line blocks
AllowShortBlocksOnASingleLine: Empty
AllowShortFunctionsOnASingleLine: Empty # Allow in class declarations
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
SpacesInContainerLiterals: false # No spaces between opening and closing braces
SeparateDefinitionBlocks: Always # Newline between definition blocks
InsertNewlineAtEOF: true