-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.clang-format
More file actions
78 lines (67 loc) · 1.72 KB
/
Copy path.clang-format
File metadata and controls
78 lines (67 loc) · 1.72 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
---
BasedOnStyle: Google
Language: Cpp
Standard: c++17
# Indentation
IndentWidth: 4
TabWidth: 4
UseTab: Never
NamespaceIndentation: None
# Line length
ColumnLimit: 100
# Braces
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
# Spacing
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
# Line breaks for readability
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortLambdasOnASingleLine: Inline
# Always break before multiline strings
AlwaysBreakBeforeMultilineStrings: true
# Break constructor initializers
BreakConstructorInitializers: BeforeColon
# Alignment
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
# Pointer alignment
PointerAlignment: Left
# Include sorting
SortIncludes: true
IncludeBlocks: Regroup
# Other
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1