-
Notifications
You must be signed in to change notification settings - Fork 17
/
.clang-format
100 lines (86 loc) · 2.81 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
---
# We want to keep all those values in the global section (not language specific) since we need to apply them to both C/C++ and ObjC/ObjC++ (without duplicating everything)
Standard: Cpp11
ColumnLimit: 800
TabWidth: '2'
UseTab: Always
AccessModifierOffset: -2
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
ObjCBlockIndentWidth: 2
IndentWidth: 2
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: true
AlignTrailingComments: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BeforeLambdaBody: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: BeforeComma # I would prefer to only break if wrapping applies (but always break colon)
ConstructorInitializerAllOnOneLineOrOnePerLine: false
BreakInheritanceList: BeforeColon # I would prefer to only break if wrapping applies (and never break colon), so right now I prefer BeforeColon instead of BeforeComma
BreakStringLiterals: false
CompactNamespaces: false
Cpp11BracedListStyle: false
IndentCaseLabels: true
FixNamespaceComments: true
IndentPPDirectives: AfterHash
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ReflowComments: false
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
DerivePointerAlignment: false
PointerAlignment: Left
IncludeBlocks: Regroup
SortIncludes: false # Cannot sort includes, it can break compilation
# Objective C specific values
ObjCBinPackProtocolList: Auto
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
...