-
Notifications
You must be signed in to change notification settings - Fork 1
/
.clang-format
67 lines (66 loc) · 1.84 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
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine : true
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
PointerAlignment: Left
IndentWidth: 4
SortIncludes: false
MaxEmptyLinesToKeep: 2
AllowShortFunctionsOnASingleLine: false
SpacesInSquareBrackets: false
SpacesInParentheses : false
SpaceBeforeAssignmentOperators: true
SpacesInContainerLiterals: true
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: true
BreakConstructorInitializersBeforeComma: true
SpaceAfterCStyleCast: false
IndentCaseLabels: true
TabWidth: 4
UseTab: Never
BreakBeforeBraces: Custom
BraceWrapping:
# case 语句后面
AfterCaseLabel: false
# class定义后面
AfterClass: false
# 控制语句后面
AfterControlStatement: false
# enum定义后面
AfterEnum: false
# 函数定义后面
AfterFunction: false
# 命名空间定义后面
AfterNamespace: false
# struct定义后面
AfterStruct: false
# union定义后面
AfterUnion: false
# extern 导出块后面
AfterExternBlock: false
# catch之前
BeforeCatch: true
# else之前
BeforeElse: true
# 缩进大括号(整个大括号框起来的部分都缩进)
IndentBraces: false
# 空函数的大括号是否可以在一行
SplitEmptyFunction: true
# 空记录体(struct/class/union)的大括号是否可以在一行
SplitEmptyRecord: true
# 空名字空间的大括号是否可以在一行
SplitEmptyNamespace: true