forked from MaaGF1/GFL-Linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clang-format
More file actions
82 lines (70 loc) · 1.96 KB
/
Copy path.clang-format
File metadata and controls
82 lines (70 loc) · 1.96 KB
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
# 基本设置
Language: Cpp
BasedOnStyle: Microsoft
IndentWidth: 4
ColumnLimit: 180
UseTab: ForIndentation
# 大括号设置
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
AfterExternBlock: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
# 构造函数初始化列表设置
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
ConstructorInitializerIndentWidth: 4
AllowAllConstructorInitializersOnNextLine: true
ConstructorInitializerAllOnOneLineOrOnePerLine: false
# 注释设置
SpacesBeforeTrailingComments: 1
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: 1
# Include 设置
SortIncludes: false
# Extern "C" 设置
IndentExternBlock: NoIndent
# 单行 if 语句设置,这里允许多种风格存在,因此忽略
# AllowShortIfStatementsOnASingleLine: true
# AllowShortBlocksOnASingleLine: true
# AllowShortCaseLabelsOnASingleLine: false
# 其他设置
AlignAfterOpenBracket: Align
AllowShortFunctionsOnASingleLine: None
BinPackParameters: false
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
PointerAlignment: Right
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
AlwaysBreakBeforeMultilineStrings: true
AllowAllParametersOfDeclarationOnNextLine: false
# Doxygen 注释设置
CommentPragmas: '^ IWYU pragma:'
# 保持 Doxygen 注释中星号后的空格
DerivePointerAlignment: false
ReflowComments: false
# 访问修饰符对齐
AccessModifierOffset: -4
# 三元运算符设置
BreakBeforeTernaryOperators: false
AlignOperands: DontAlign
# 保持条件表达式格式
AllowShortLambdasOnASingleLine: Empty