-
Notifications
You must be signed in to change notification settings - Fork 5
/
.clang-format
121 lines (108 loc) · 2.91 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
---
Language: CSharp
BasedOnStyle: LLVM
# Whitespace
MaxEmptyLinesToKeep: 2
IndentWidth: 4
ColumnLimit: 100
UseTab: Never
# Preprocessor
AlignEscapedNewlines: Left
IncludeBlocks: Regroup
# Functions
AllowAllArgumentsOnNextLine: false
BinPackArguments: false
BinPackParameters: false
AllowAllParametersOfDeclarationOnNextLine: false
PenaltyReturnTypeOnItsOwnLine: 9999999
PenaltyBreakBeforeFirstCallParameter: 6
AllowShortFunctionsOnASingleLine: Inline
# Brackets and braces
AlignAfterOpenBracket: AlwaysBreak
BreakBeforeBraces: Allman
BreakAfterAttributes : Never
# Pointers
PointerAlignment: Left
# Classes
PackConstructorInitializers: NextLineOnly
BreakConstructorInitializers: BeforeComma
AccessModifierOffset: -4
# Switch statements
IndentCaseBlocks: true
# Templates
SpaceAfterTemplateKeyword: false
AlwaysBreakTemplateDeclarations: true
# Misc
SortUsingDeclarations: Never
AlignConsecutiveAssignments: true
AlignConsecutiveBitFields: true
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
---
Language: Cpp
BasedOnStyle: LLVM
AccessModifierOffset: '-2'
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: 'true'
AlignConsecutiveDeclarations: 'true'
AlignOperands: 'true'
AlignTrailingComments: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'false'
AllowShortBlocksOnASingleLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'false'
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: 'false'
AllowShortLoopsOnASingleLine: 'false'
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: 'true'
AlwaysBreakTemplateDeclarations: 'true'
BinPackArguments: 'true'
BinPackParameters: 'false'
ExperimentalAutoDetectBinPacking: 'false'
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: 'false'
BreakConstructorInitializersBeforeComma: 'true'
ColumnLimit: '120'
ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
Cpp11BracedListStyle: 'true'
IndentCaseLabels: 'true'
IndentWidth: '2'
KeepEmptyLinesAtTheStartOfBlocks: 'true'
MaxEmptyLinesToKeep: '2'
NamespaceIndentation: None
ObjCSpaceBeforeProtocolList: 'true'
PointerAlignment: Left
SpaceAfterCStyleCast: 'false'
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeParens: Never
SpaceInEmptyParentheses: 'false'
SpacesBeforeTrailingComments: '2'
SpacesInAngles: 'false'
SpacesInCStyleCastParentheses: 'false'
SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false'
Standard: Cpp11
TabWidth: '2'
UseTab: Never
SortIncludes: 'false'
ReflowComments: 'false'
BraceWrapping: {
AfterClass: 'true'
AfterControlStatement: 'true'
AfterEnum: 'true'
AfterFunction: 'true'
AfterNamespace: 'false'
AfterStruct: 'true'
AfterUnion: 'true'
BeforeCatch: 'true'
BeforeElse: 'true'
IndentBraces: 'false'
}
PenaltyExcessCharacter: 1
PenaltyBreakBeforeFirstCallParameter: 40
PenaltyBreakFirstLessLess: 1
PenaltyBreakComment: 30
PenaltyBreakString: 30
PenaltyReturnTypeOnItsOwnLine: 9999
BreakStringLiterals: false