-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
101 lines (89 loc) · 2.33 KB
/
.clang-format
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
BasedOnStyle: Google
AccessModifierOffset: -2
# alignment
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: 'false'
AlignConsecutiveDeclarations: 'false'
AlignEscapedNewlines: Left
AlignOperands: AlignAfterOperator
AlignTrailingComments: 'true'
# inlining
AllowAllArgumentsOnNextLine: 'true'
AllowShortBlocksOnASingleLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'false'
AllowShortFunctionsOnASingleLine: 'Inline'
AllowShortIfStatementsOnASingleLine: 'false'
AllowShortLoopsOnASingleLine: 'false'
RequiresClausePosition: 'OwnLine'
# breaking
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeConceptDeclarations: 'Always'
BreakBeforeTernaryOperators: 'true'
BreakConstructorInitializers: AfterColon
PenaltyBreakString: '3'
# bracing
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: false
AfterExternBlock: false
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
ColumnLimit: 120
CompactNamespaces: 'true'
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: 'true'
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: 'true'
NamespaceIndentation: All
QualifierAlignment: Left
RemoveSemicolon: true
#includes
SortIncludes: CaseInsensitive
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '".+\.h'
Priority: 2
- Regex: '^<(event2|ngtcp2)'
Priority: 3
- Regex: '<winsock2\.h>'
Priority: 4
- Regex: '<windows\.h>'
Priority: 5
- Regex: '^<CLI'
Priority: 6
- Regex: '^<catch2'
Priority: 7
- Regex: '^<.*\.h(pp)?>$'
Priority: 8
- Regex: '(<)(.)+(>)'
Priority: 9
# spacing
SpaceBeforeParens: ControlStatements
SpacesInAngles: 'false'
SpacesInContainerLiterals: 'false'
SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false'
Standard: c++20
UseTab: Never
# treat pointers and reference declarations as if part of the type
DerivePointerAlignment: false
PointerAlignment: Left
# when wrapping function calls/declarations, force each parameter to have its own line
BinPackParameters: 'false'
BinPackArguments: 'false'