-
Notifications
You must be signed in to change notification settings - Fork 2
/
.clang-format
63 lines (53 loc) · 1.27 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
IndentWidth: 4
TabWidth: 4
Language: Cpp
BasedOnStyle: Google
ColumnLimit: 120
Standard: C++11
IncludeBlocks: Merge
# indent
AccessModifierOffset: -3
# align
BreakBeforeTernaryOperators: true
# constructor
ConstructorInitializerAllOnOneLineOrOnePerLine: false
# Parameters
BinPackParameters: true
AlignAfterOpenBracket: DontAlign
# short block
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
# other
AlwaysBreakTemplateDeclarations: true
DerivePointerAlignment: false
PointerAlignment: Right
ReflowComments: true
BreakBeforeBraces: Custom
# 大括号换行,只有当BreakBeforeBraces设置为Custom时才有效
BraceWrapping:
# class定义后面
AfterClass: false
# 控制语句后面
AfterControlStatement: false
# enum定义后面
AfterEnum: false
# 函数定义后面
AfterFunction: false
# 命名空间定义后面
AfterNamespace: false
# ObjC定义后面
AfterObjCDeclaration: false
# struct定义后面
AfterStruct: false
# union定义后面
AfterUnion: false
# catch之前
BeforeCatch: true
# else之前
BeforeElse: false
# 缩进大括号
IndentBraces: false
FixNamespaceComments: true