-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
165 lines (152 loc) · 6.16 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
---
# ==============================================================================
# General
# ==============================================================================
AlignTrailingComments: true
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeTernaryOperators: false
BreakStringLiterals: true
ColumnLimit: 80
ContinuationIndentWidth: 4
DeriveLineEnding: false
IndentPPDirectives: BeforeHash
IndentWidth: 4
# InsertTrailingCommas: None
MaxEmptyLinesToKeep: 1
SortUsingDeclarations: true
Standard: Latest
TabWidth: 4
UseCRLF: false
UseTab: ForIndentation
# ==============================================================================
# Declarations
# ==============================================================================
AlignConsecutiveAssignments: true
# AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
AlignEscapedNewlines: Left
# BitFieldColonSpacing: After
# ==============================================================================
# Statements
# ==============================================================================
AlignOperands: true
# ==============================================================================
# Functions
# ==============================================================================
AlignAfterOpenBracket: Align
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortLambdasOnASingleLine: All
# AlwaysBreakAfterReturnType: All
BinPackArguments: false
BinPackParameters: false
IndentWrappedFunctionNames: true
# SpaceInEmptyParens: false
# ==============================================================================
# Classes
# ==============================================================================
AccessModifierOffset: -4
AllowAllConstructorInitializersOnNextLine: false
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
SpaceBeforeCtorInitializerColon: false
SpaceBeforeInheritanceColon: true
# ==============================================================================
# Blocks
# ==============================================================================
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
# AllowShortEnumsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
CompactNamespaces: false
Cpp11BracedListStyle: true
IndentCaseLabels: true
# IndentExternBlock: Indent
IndentGotoLabels: true
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: All
SpaceInEmptyBlock: true
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: false
BeforeElse: false
# BeforeLambdaBody: false
# BeforeWhile: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
# ==============================================================================
# Templates
# ==============================================================================
AlwaysBreakTemplateDeclarations: Yes
SpaceAfterTemplateKeyword: false
# ==============================================================================
# Pointers
# ==============================================================================
DerivePointerAlignment: false
PointerAlignment: Right
# ==============================================================================
# Comments
# ==============================================================================
FixNamespaceComments: true
ReflowComments: true
# SpaceBeforeTrailingComments: 1
# ==============================================================================
# Include Order
# ==============================================================================
SortIncludes: true
IncludeBlocks: Regroup
IncludeCategories:
# local C headers
- Regex: '"[a-zA-Z0-9\-_/]+.h"'
Priority: 1
# local CPP headers
- Regex: '"[a-zA-Z0-9\-_/]+.(hpp|tpp)"'
Priority: 2
# stdlib C
- Regex: '^<[a-zA-Z\-_]+.h>$'
Priority: 6
# stdlib
- Regex: '^<[a-zA-Z\-_]+>$'
Priority: 7
# installed C libraries
- Regex: '^<[a-zA-Z0-9\-_/]+.h>$'
Priority: 5
# intalled C++ libraries
- Regex: '^<[a-zA-Z0-9\-_/]+.hpp>$'
Priority: 5
# IncludeIsMainRegex:
# IncludeIsMainSourceRegex:
# ==============================================================================
# Operators
# ==============================================================================
SpaceAfterLogicalNot: false
# SpaceAterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList : false
SpaceBeforeParens: Never
SpaceBeforeRangeBasedForLoopColon: false
SpaceBeforeSquareBrackets: false
# ==============================================================================
# Bracketing Styles
# ==============================================================================
# SpaceInAngles: false
# SpaceInConditionalStatement: false
# SpaceInContainerLiterals: false
# SpaceInCStyleCastParentheses: false
# SpaceInParentheses: false
# SpaceInSquareBrackets: false