-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
88 lines (77 loc) · 2.31 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
---
BasedOnStyle: WebKit
# Control alignment of things
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveMacros: Consecutive
AlignEscapedNewlines: Right
AlignOperands: Align
AlignArrayOfStructures: None
AlignTrailingComments: true
# Control what statements can be compressed onto a single line
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
# Control how functions are formatted
IndentWrappedFunctionNames: false
PenaltyReturnTypeOnItsOwnLine: 1000
PenaltyBreakBeforeFirstCallParameter: 1
# Control whether functions arguments can be on the same line
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
BinPackArguments: false
BinPackParameters: false
# Control where newlines are inserted or removed
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: true
BreakStringLiterals: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
PenaltyBreakComment: 0
PenaltyBreakAssignment: 1000
# Control brace placement
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterControlStatement: MultiLine
AfterEnum: false
AfterStruct: false
AfterUnion: false
AfterFunction: true
BeforeElse: false
SplitEmptyFunction: false
SplitEmptyRecord: false
# Control where spaces are added or removed
PointerAlignment: Right
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceBeforeSquareBrackets: false
SpacesBeforeTrailingComments: 2
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesInSquareBrackets: false
SpacesInCStyleCastParentheses: false
# Control how things are indented
IndentWidth: 4
ContinuationIndentWidth: 4
UseTab: Never
IndentCaseLabels: true
IndentPPDirectives: None
# Control how includes are sorted
# Note: IncludeCategories can be used to automatically group includes
IncludeBlocks: Regroup
SortIncludes: CaseSensitive
# Other settings
ColumnLimit: 100
QualifierAlignment: Custom
QualifierOrder: ['static', 'inline', 'volatile', 'type', 'const']
ReflowComments: true
# C++ specific settings
Cpp11BracedListStyle: true
NamespaceIndentation: None
SpaceBeforeCpp11BracedList: true
---