forked from NXIST-backup/algorithm_trans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
115 lines (83 loc) · 2.43 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
# 工具 https://github.com/mapbox/XcodeClangFormat
# 函数名详细地址 英文 http://clang.llvm.org/docs/ClangFormatStyleOptions.html
# 函数名详细地址 中文 https://www.cnblogs.com/PaulpauL/p/5929753.html
# 基于样式
BasedOnStyle: LLVM
# 对齐注释
AlignTrailingComments: true
# 指针和引用的对齐方式
PointerAlignment: Right
# 用于缩进的列数
IndentWidth: 4
# switch的case缩进
IndentCaseLabels: true
# OC里面,在@property后加空格
ObjCSpaceAfterProperty: true
# OC里面,在Protocol前后加空格
ObjCSpaceBeforeProtocolList: true
# 单行注释前的空格数
SpacesBeforeTrailingComments: 1
# 连续的空行保留几行
MaxEmptyLinesToKeep: 1
# 保留block里面的空行
KeepEmptyLinesAtTheStartOfBlocks: false
# 每行字符的限制,0表示没有限制
ColumnLimit: 0
# []中添加空格
SpacesInSquareBrackets: false
# ()中添加空格
SpacesInParentheses : false
# 容器类前添加空格
SpacesInContainerLiterals: true
# 赋值运算符前加空格
SpaceBeforeAssignmentOperators: true
# 在空括号中加空格
SpaceInEmptyParentheses: false
# 在<>中间插入空格
SpacesInAngles: false
# 换行的时候对齐操作符
AlignOperands: true
# 括号中的(),{},[]代码对齐方式
#AlignAfterOpenBracket: Align
#ContinuationIndentWidth: 0
# 赋值=对齐
AlignConsecutiveAssignments: false
# 声明参数对齐
AlignConsecutiveDeclarations: false
# 运算符位置
BreakBeforeBinaryOperators: None
# 允许短的函数放在同一行
#AllowShortFunctionsOnASingleLine: None
# 允许case在同一行
AllowShortCaseLabelsOnASingleLine: false
# 允许if在同一行
AllowShortIfStatementsOnASingleLine: false
# 允许while在同一行
AllowShortLoopsOnASingleLine: false
# 允许将简单的语句块放到同一行
AllowShortBlocksOnASingleLine: false
#缩进函数名
IndentWrappedFunctionNames: false
# 形参 如果为false要么都在同一行,要么各有一行
BinPackParameters: false
# 实参 如果为false要么都在同一行,要么各有一行
BinPackArguments: false
# 大括号换行
BreakBeforeBraces: Custom
BraceWrapping:
# class定义后面
AfterClass: true
# 控制语句后面
AfterControlStatement: false
# enum定义后面
AfterEnum: false
# 函数定义后面
AfterFunction: true
# 命名空间定义后面
AfterNamespace: false
# struct定义后面
AfterStruct: true
# union定义后面
AfterUnion: true
# catch之前
BeforeCatch: false