-
-
Notifications
You must be signed in to change notification settings - Fork 726
Expand file tree
/
Copy path.clang-format
More file actions
108 lines (90 loc) · 2.49 KB
/
.clang-format
File metadata and controls
108 lines (90 loc) · 2.49 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
Language: Cpp
BasedOnStyle: LLVM
Standard: c++17
# Column limit
ColumnLimit: 83
# Indentation
IndentWidth: 2
TabWidth: 2
UseTab: Never
ContinuationIndentWidth: 4
ConstructorInitializerIndentWidth: 2
IndentCaseLabels: true
IndentCaseBlocks: false
IndentPPDirectives: BeforeHash
NamespaceIndentation: None
IndentWrappedFunctionNames: true
IndentAccessModifiers: false
# Access modifiers at same level as class members
AccessModifierOffset: 0
# Constructor initializers: colon at end of line, each initializer on new line
BreakConstructorInitializers: AfterColon
PackConstructorInitializers: Never
# Inheritance
BreakInheritanceList: BeforeColon
# Pointer/Reference alignment: attached to type
PointerAlignment: Left
ReferenceAlignment: Pointer
DerivePointerAlignment: false
# Spacing
SpaceBeforeParens: ControlStatements
SpaceBeforeCpp11BracedList: false
SpaceInEmptyBlock: false
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeRangeBasedForLoopColon: true
# Alignment
AlignAfterOpenBracket: Align
AlignOperands: Align
AlignTrailingComments: true
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations: false
# Short forms
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortLambdasOnASingleLine: All
AllowShortEnumsOnASingleLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortCaseExpressionOnASingleLine: true
# Packing
BinPackArguments: true
BinPackParameters: true
# Includes - preserve existing order
SortIncludes: Never
SortUsingDeclarations: Never
# Namespaces
CompactNamespaces: false
FixNamespaceComments: false
# Empty lines
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
MaxEmptyLinesToKeep: 2
# Ternary operators stay at end of line
BreakBeforeTernaryOperators: false
# Misc
Cpp11BracedListStyle: true
ReflowComments: true
InsertBraces: true
InsertNewlineAtEOF: true
BreakTemplateDeclarations: Yes
BreakBeforeCloseBracketBracedList: true
BreakBeforeCloseBracketFunction: true
BreakBeforeTemplateCloser: true
EnumTrailingComma: Insert
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: true
AcrossComments: true
BreakAfterReturnType: ExceptShortType
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterControlStatement: MultiLine
RemoveEmptyLinesInUnwrappedLines: true
RemoveSemicolon: true
QualifierAlignment: Left