1cb7eb8c9Sopenharmony_ciLanguage: Cpp
2cb7eb8c9Sopenharmony_ci# BasedOnStyle:  LLVM
3cb7eb8c9Sopenharmony_ci# 访问说明符(public、private等)的偏移
4cb7eb8c9Sopenharmony_ciAccessModifierOffset: -4
5cb7eb8c9Sopenharmony_ci# 开括号(开圆括号、开尖括号、开方括号)后的对齐
6cb7eb8c9Sopenharmony_ciAlignAfterOpenBracket: Align
7cb7eb8c9Sopenharmony_ci# 连续赋值时,等号对齐
8cb7eb8c9Sopenharmony_ciAlignConsecutiveAssignments: false
9cb7eb8c9Sopenharmony_ci# 连续赋值时,变量名对齐
10cb7eb8c9Sopenharmony_ciAlignConsecutiveDeclarations: false
11cb7eb8c9Sopenharmony_ci# 左对齐逃脱换行(使用反斜杠换行)的反斜杠
12cb7eb8c9Sopenharmony_ciAlignEscapedNewlinesLeft: true
13cb7eb8c9Sopenharmony_ci# 水平对齐二元和三元表达式的操作数
14cb7eb8c9Sopenharmony_ciAlignOperands: true
15cb7eb8c9Sopenharmony_ci# 对齐连续的尾随的注释
16cb7eb8c9Sopenharmony_ciAlignTrailingComments: true
17cb7eb8c9Sopenharmony_ci# 允许函数声明的所有参数在放在下一行
18cb7eb8c9Sopenharmony_ciAllowAllParametersOfDeclarationOnNextLine: false
19cb7eb8c9Sopenharmony_ci# 允许短的块放在同一行
20cb7eb8c9Sopenharmony_ciAllowShortBlocksOnASingleLine: false
21cb7eb8c9Sopenharmony_ci# 允许短的case标签放在同一行
22cb7eb8c9Sopenharmony_ciAllowShortCaseLabelsOnASingleLine: false
23cb7eb8c9Sopenharmony_ci# 允许短的函数放在同一行: None, InlineOnly(定义在类中), Empty(空函数), Inline(定义在类中,空函数), All
24cb7eb8c9Sopenharmony_ciAllowShortFunctionsOnASingleLine: Empty
25cb7eb8c9Sopenharmony_ci# 允许短的if语句保持在同一行
26cb7eb8c9Sopenharmony_ciAllowShortIfStatementsOnASingleLine: false
27cb7eb8c9Sopenharmony_ci# 允许短的循环保持在同一行
28cb7eb8c9Sopenharmony_ciAllowShortLoopsOnASingleLine: false
29cb7eb8c9Sopenharmony_ci# 总是在定义返回类型后换行(deprecated)
30cb7eb8c9Sopenharmony_ciAlwaysBreakAfterDefinitionReturnType: None
31cb7eb8c9Sopenharmony_ci# 总是在返回类型后换行: None, All, TopLevel(顶级函数,不包括在类中的函数),
32cb7eb8c9Sopenharmony_ci#   AllDefinitions(所有的定义,不包括声明), TopLevelDefinitions(所有的顶级函数的定义)
33cb7eb8c9Sopenharmony_ciAlwaysBreakAfterReturnType: None
34cb7eb8c9Sopenharmony_ci# 总是在多行string字面量前换行
35cb7eb8c9Sopenharmony_ciAlwaysBreakBeforeMultilineStrings: true
36cb7eb8c9Sopenharmony_ci# 总是在template声明后换行
37cb7eb8c9Sopenharmony_ciAlwaysBreakTemplateDeclarations: true
38cb7eb8c9Sopenharmony_ci#
39cb7eb8c9Sopenharmony_ciSpaceAfterTemplateKeyword: false
40cb7eb8c9Sopenharmony_ci# false表示函数实参要么都在同一行,要么都各自一行
41cb7eb8c9Sopenharmony_ciBinPackArguments: true
42cb7eb8c9Sopenharmony_ci# false表示所有形参要么都在同一行,要么都各自一行
43cb7eb8c9Sopenharmony_ciBinPackParameters: false
44cb7eb8c9Sopenharmony_ci# 大括号换行,只有当BreakBeforeBraces设置为Custom时才有效
45cb7eb8c9Sopenharmony_ciBraceWrapping:
46cb7eb8c9Sopenharmony_ci  AfterClass: false
47cb7eb8c9Sopenharmony_ci  AfterControlStatement: false
48cb7eb8c9Sopenharmony_ci  AfterEnum: false
49cb7eb8c9Sopenharmony_ci  AfterFunction: true
50cb7eb8c9Sopenharmony_ci  AfterNamespace: false
51cb7eb8c9Sopenharmony_ci  AfterObjCDeclaration: false
52cb7eb8c9Sopenharmony_ci  AfterStruct: false
53cb7eb8c9Sopenharmony_ci  AfterUnion: false
54cb7eb8c9Sopenharmony_ci  BeforeCatch: false
55cb7eb8c9Sopenharmony_ci  BeforeElse: false
56cb7eb8c9Sopenharmony_ci  IndentBraces: false
57cb7eb8c9Sopenharmony_ci# 在二元运算符前换行: None(在操作符后换行), NonAssignment(在非赋值的操作符前换行), All(在操作符前换行)
58cb7eb8c9Sopenharmony_ciBreakBeforeBinaryOperators: None
59cb7eb8c9Sopenharmony_ci# 在大括号前换行: Attach(始终将大括号附加到周围的上下文), Linux(除函数、命名空间和类定义,与Attach类似),
60cb7eb8c9Sopenharmony_ci#   Mozilla(除枚举、函数、记录定义,与Attach类似), Stroustrup(除函数定义、catch、else,与Attach类似),
61cb7eb8c9Sopenharmony_ci#   Allman(总是在大括号前换行), GNU(总是在大括号前换行,并对于控制语句的大括号增加额外的缩进), WebKit(在函数前换行), Custom
62cb7eb8c9Sopenharmony_ci#   注:这里认为语句块也属于函数
63cb7eb8c9Sopenharmony_ciBreakBeforeBraces: Custom
64cb7eb8c9Sopenharmony_ci# 在三元运算符前换行
65cb7eb8c9Sopenharmony_ciBreakBeforeTernaryOperators: true
66cb7eb8c9Sopenharmony_ci# 在构造函数的初始化列表的逗号前换行
67cb7eb8c9Sopenharmony_ciBreakConstructorInitializersBeforeComma: false
68cb7eb8c9Sopenharmony_ci# 每行字符的限制,0表示没有限制
69cb7eb8c9Sopenharmony_ciColumnLimit: 120
70cb7eb8c9Sopenharmony_ci# 描述具有特殊意义的注释的正则表达式,它不应该被分割为多行或以其它方式改变
71cb7eb8c9Sopenharmony_ciCommentPragmas: "^ IWYU pragma:"
72cb7eb8c9Sopenharmony_ci# 构造函数的初始化列表要么都在同一行,要么都各自一行
73cb7eb8c9Sopenharmony_ciConstructorInitializerAllOnOneLineOrOnePerLine: true
74cb7eb8c9Sopenharmony_ci# 构造函数的初始化列表的缩进宽度
75cb7eb8c9Sopenharmony_ciConstructorInitializerIndentWidth: 4
76cb7eb8c9Sopenharmony_ci# 延续的行的缩进宽度
77cb7eb8c9Sopenharmony_ciContinuationIndentWidth: 4
78cb7eb8c9Sopenharmony_ci# 去除C++11的列表初始化的大括号{后和}前的空格
79cb7eb8c9Sopenharmony_ciCpp11BracedListStyle: true
80cb7eb8c9Sopenharmony_ci# 继承最常用的指针和引用的对齐方式
81cb7eb8c9Sopenharmony_ciDerivePointerAlignment: false
82cb7eb8c9Sopenharmony_ci# 关闭格式化
83cb7eb8c9Sopenharmony_ciDisableFormat: false
84cb7eb8c9Sopenharmony_ci# 自动检测函数的调用和定义是否被格式为每行一个参数(Experimental)
85cb7eb8c9Sopenharmony_ciExperimentalAutoDetectBinPacking: false
86cb7eb8c9Sopenharmony_ci# 需要被解读为foreach循环而不是函数调用的宏
87cb7eb8c9Sopenharmony_ciForEachMacros: [foreach, Q_FOREACH, BOOST_FOREACH]
88cb7eb8c9Sopenharmony_ci# 对#include进行排序,匹配了某正则表达式的#include拥有对应的优先级,匹配不到的则默认优先级为INT_MAX(优先级越小排序越靠前),
89cb7eb8c9Sopenharmony_ci# 可以定义负数优先级从而保证某些#include永远在最前面
90cb7eb8c9Sopenharmony_ciIncludeCategories:
91cb7eb8c9Sopenharmony_ci  - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
92cb7eb8c9Sopenharmony_ci    Priority: 2
93cb7eb8c9Sopenharmony_ci  - Regex: '^(<|"(gtest|isl|json)/)'
94cb7eb8c9Sopenharmony_ci    Priority: 3
95cb7eb8c9Sopenharmony_ci  - Regex: ".*"
96cb7eb8c9Sopenharmony_ci    Priority: 1
97cb7eb8c9Sopenharmony_ci# 缩进case标签
98cb7eb8c9Sopenharmony_ciIndentCaseLabels: true
99cb7eb8c9Sopenharmony_ci# 缩进宽度
100cb7eb8c9Sopenharmony_ciIndentWidth: 4
101cb7eb8c9Sopenharmony_ci# 函数返回类型换行时,缩进函数声明或函数定义的函数名
102cb7eb8c9Sopenharmony_ciIndentWrappedFunctionNames: true
103cb7eb8c9Sopenharmony_ci# 保留在块开始处的空行
104cb7eb8c9Sopenharmony_ciKeepEmptyLinesAtTheStartOfBlocks: true
105cb7eb8c9Sopenharmony_ci# 开始一个块的宏的正则表达式
106cb7eb8c9Sopenharmony_ciMacroBlockBegin: ""
107cb7eb8c9Sopenharmony_ci# 结束一个块的宏的正则表达式
108cb7eb8c9Sopenharmony_ciMacroBlockEnd: ""
109cb7eb8c9Sopenharmony_ci# 连续空行的最大数量
110cb7eb8c9Sopenharmony_ciMaxEmptyLinesToKeep: 1
111cb7eb8c9Sopenharmony_ci# 命名空间的缩进: None, Inner(缩进嵌套的命名空间中的内容), All
112cb7eb8c9Sopenharmony_ciNamespaceIndentation: None
113cb7eb8c9Sopenharmony_ci# 使用ObjC块时缩进宽度
114cb7eb8c9Sopenharmony_ciObjCBlockIndentWidth: 4
115cb7eb8c9Sopenharmony_ci# 在ObjC的@property后添加一个空格
116cb7eb8c9Sopenharmony_ciObjCSpaceAfterProperty: false
117cb7eb8c9Sopenharmony_ci# 在ObjC的protocol列表前添加一个空格
118cb7eb8c9Sopenharmony_ciObjCSpaceBeforeProtocolList: true
119cb7eb8c9Sopenharmony_ci# 在call(后对函数调用换行的penalty
120cb7eb8c9Sopenharmony_ciPenaltyBreakBeforeFirstCallParameter: 19
121cb7eb8c9Sopenharmony_ci# 在一个注释中引入换行的penalty
122cb7eb8c9Sopenharmony_ciPenaltyBreakComment: 300
123cb7eb8c9Sopenharmony_ci# 第一次在<<前换行的penalty
124cb7eb8c9Sopenharmony_ciPenaltyBreakFirstLessLess: 120
125cb7eb8c9Sopenharmony_ci# 在一个字符串字面量中引入换行的penalty
126cb7eb8c9Sopenharmony_ciPenaltyBreakString: 1000
127cb7eb8c9Sopenharmony_ci# 对于每个在行字符数限制之外的字符的penalty
128cb7eb8c9Sopenharmony_ciPenaltyExcessCharacter: 1000000
129cb7eb8c9Sopenharmony_ci# 将函数的返回类型放到它自己的行的penalty
130cb7eb8c9Sopenharmony_ciPenaltyReturnTypeOnItsOwnLine: 60
131cb7eb8c9Sopenharmony_ci# 指针和引用的对齐: Left, Right, Middle
132cb7eb8c9Sopenharmony_ciPointerAlignment: Right
133cb7eb8c9Sopenharmony_ci# 允许重新排版注释
134cb7eb8c9Sopenharmony_ciReflowComments: true
135cb7eb8c9Sopenharmony_ci# 允许排序#include
136cb7eb8c9Sopenharmony_ciSortIncludes: true
137cb7eb8c9Sopenharmony_ci# 在C风格类型转换后添加空格
138cb7eb8c9Sopenharmony_ciSpaceAfterCStyleCast: false
139cb7eb8c9Sopenharmony_ci# 在赋值运算符之前添加空格
140cb7eb8c9Sopenharmony_ciSpaceBeforeAssignmentOperators: true
141cb7eb8c9Sopenharmony_ci# 开圆括号之前添加一个空格: Never, ControlStatements, Always
142cb7eb8c9Sopenharmony_ciSpaceBeforeParens: ControlStatements
143cb7eb8c9Sopenharmony_ci# 在空的圆括号中添加空格
144cb7eb8c9Sopenharmony_ciSpaceInEmptyParentheses: false
145cb7eb8c9Sopenharmony_ci# 在尾随的评论前添加的空格数(只适用于//)
146cb7eb8c9Sopenharmony_ciSpacesBeforeTrailingComments: 1
147cb7eb8c9Sopenharmony_ci# 在尖括号的<后和>前添加空格
148cb7eb8c9Sopenharmony_ciSpacesInAngles: false
149cb7eb8c9Sopenharmony_ci# 在容器(ObjC和JavaScript的数组和字典等)字面量中添加空格
150cb7eb8c9Sopenharmony_ciSpacesInContainerLiterals: true
151cb7eb8c9Sopenharmony_ci# 在C风格类型转换的括号中添加空格
152cb7eb8c9Sopenharmony_ciSpacesInCStyleCastParentheses: false
153cb7eb8c9Sopenharmony_ci# 在圆括号的(后和)前添加空格
154cb7eb8c9Sopenharmony_ciSpacesInParentheses: false
155cb7eb8c9Sopenharmony_ci# 在方括号的[后和]前添加空格,lamda表达式和未指明大小的数组的声明不受影响
156cb7eb8c9Sopenharmony_ciSpacesInSquareBrackets: false
157cb7eb8c9Sopenharmony_ci# 标准: Cpp03, Cpp11, Auto
158cb7eb8c9Sopenharmony_ciStandard: Cpp11
159cb7eb8c9Sopenharmony_ci# tab宽度
160cb7eb8c9Sopenharmony_ciTabWidth: 4
161cb7eb8c9Sopenharmony_ci# 使用tab字符: Never, ForIndentation, ForContinuationAndIndentation, Always
162cb7eb8c9Sopenharmony_ciUseTab: Never