-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.clang-format
More file actions
70 lines (62 loc) · 1.7 KB
/
.clang-format
File metadata and controls
70 lines (62 loc) · 1.7 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
BasedOnStyle: Google
UseTab: Never
IndentWidth: 4
TabWidth: 4
# Line length and breaking
ColumnLimit: 80
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBraces: Attach
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
# Pointer and reference alignment
PointerAlignment: Left
ReferenceAlignment: Left
DerivePointerAlignment: false
# Include organization
SortIncludes: CaseSensitive
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*>'
Priority: 2
- Regex: '.*'
Priority: 3
# Alignment
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations: None
AlignConsecutiveMacros: Consecutive
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
# Spacing
SpaceBeforeParens: ControlStatements
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceInEmptyParentheses: false
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
# Function and method formatting
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortLambdasOnASingleLine: All
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
# Indentation
IndentCaseLabels: true
IndentPPDirectives: None
IndentWrappedFunctionNames: false
NamespaceIndentation: None
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
# Other
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: false
ReflowComments: true
SortUsingDeclarations: true
CompactNamespaces: false