-
Notifications
You must be signed in to change notification settings - Fork 16
/
.clang-format
67 lines (61 loc) · 1.53 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
---
# 11.1.0
Language: Cpp
Standard: Auto
# identation
AccessModifierOffset: -2
UseTab: Never
ColumnLimit: 120
IndentWidth: 2
CommentPragmas: '^!'
IndentPPDirectives: AfterHash
IndentWrappedFunctionNames: true
NamespaceIndentation: All
IndentCaseLabels: false
# breaks
AlignOperands: true
AlwaysBreakTemplateDeclarations: Yes
AlwaysBreakBeforeMultilineStrings: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: true
PenaltyBreakAssignment: 10
# ctors
BreakConstructorInitializers: BeforeComma
ConstructorInitializerIndentWidth: 2
BreakInheritanceList: BeforeComma
# braces
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
# spaces
PointerAlignment: Left
SpaceAfterTemplateKeyword: false
SpacesBeforeTrailingComments: 2
SpaceBeforeInheritanceColon: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
# other
SortIncludes: true
SortUsingDeclarations: false
FixNamespaceComments: true