14ed2deddSopenharmony_ciLanguage: Cpp
24ed2deddSopenharmony_ci# BasedOnStyle:  LLVM
34ed2deddSopenharmony_ci# 访问说明符(public、private等)的偏移
44ed2deddSopenharmony_ciAccessModifierOffset: -4
54ed2deddSopenharmony_ci# 开括号(开圆括号、开尖括号、开方括号)后的对齐
64ed2deddSopenharmony_ciAlignAfterOpenBracket: Align
74ed2deddSopenharmony_ci# 连续赋值时,等号对齐
84ed2deddSopenharmony_ciAlignConsecutiveAssignments: false
94ed2deddSopenharmony_ci# 连续赋值时,变量名对齐
104ed2deddSopenharmony_ciAlignConsecutiveDeclarations: false
114ed2deddSopenharmony_ci# 左对齐逃脱换行(使用反斜杠换行)的反斜杠
124ed2deddSopenharmony_ciAlignEscapedNewlinesLeft: true
134ed2deddSopenharmony_ci# 水平对齐二元和三元表达式的操作数
144ed2deddSopenharmony_ciAlignOperands: true
154ed2deddSopenharmony_ci# 对齐连续的尾随的注释
164ed2deddSopenharmony_ciAlignTrailingComments: true
174ed2deddSopenharmony_ci# 允许函数声明的所有参数在放在下一行
184ed2deddSopenharmony_ciAllowAllParametersOfDeclarationOnNextLine: false
194ed2deddSopenharmony_ci# 允许短的块放在同一行
204ed2deddSopenharmony_ciAllowShortBlocksOnASingleLine: false
214ed2deddSopenharmony_ci# 允许短的case标签放在同一行
224ed2deddSopenharmony_ciAllowShortCaseLabelsOnASingleLine: false
234ed2deddSopenharmony_ci# 允许短的函数放在同一行: None, InlineOnly(定义在类中), Empty(空函数), Inline(定义在类中,空函数), All
244ed2deddSopenharmony_ciAllowShortFunctionsOnASingleLine: Empty
254ed2deddSopenharmony_ci# 允许短的if语句保持在同一行
264ed2deddSopenharmony_ciAllowShortIfStatementsOnASingleLine: false
274ed2deddSopenharmony_ci# 允许短的循环保持在同一行
284ed2deddSopenharmony_ciAllowShortLoopsOnASingleLine: false
294ed2deddSopenharmony_ci# 总是在定义返回类型后换行(deprecated)
304ed2deddSopenharmony_ciAlwaysBreakAfterDefinitionReturnType: None
314ed2deddSopenharmony_ci# 总是在返回类型后换行: None, All, TopLevel(顶级函数,不包括在类中的函数),
324ed2deddSopenharmony_ci#   AllDefinitions(所有的定义,不包括声明), TopLevelDefinitions(所有的顶级函数的定义)
334ed2deddSopenharmony_ciAlwaysBreakAfterReturnType: None
344ed2deddSopenharmony_ci# 总是在多行string字面量前换行
354ed2deddSopenharmony_ciAlwaysBreakBeforeMultilineStrings: true
364ed2deddSopenharmony_ci# 总是在template声明后换行
374ed2deddSopenharmony_ciAlwaysBreakTemplateDeclarations: false
384ed2deddSopenharmony_ci# false表示函数实参要么都在同一行,要么都各自一行
394ed2deddSopenharmony_ciBinPackArguments: true
404ed2deddSopenharmony_ci# false表示所有形参要么都在同一行,要么都各自一行
414ed2deddSopenharmony_ciBinPackParameters: false
424ed2deddSopenharmony_ci# 大括号换行,只有当BreakBeforeBraces设置为Custom时才有效
434ed2deddSopenharmony_ciBraceWrapping:
444ed2deddSopenharmony_ci  AfterClass: false
454ed2deddSopenharmony_ci  AfterControlStatement: false
464ed2deddSopenharmony_ci  AfterEnum: false
474ed2deddSopenharmony_ci  AfterFunction: true
484ed2deddSopenharmony_ci  AfterNamespace: false
494ed2deddSopenharmony_ci  AfterObjCDeclaration: false
504ed2deddSopenharmony_ci  AfterStruct: false
514ed2deddSopenharmony_ci  AfterUnion: false
524ed2deddSopenharmony_ci  BeforeCatch: false
534ed2deddSopenharmony_ci  BeforeElse: false
544ed2deddSopenharmony_ci  IndentBraces: false
554ed2deddSopenharmony_ci# 在二元运算符前换行: None(在操作符后换行), NonAssignment(在非赋值的操作符前换行), All(在操作符前换行)
564ed2deddSopenharmony_ciBreakBeforeBinaryOperators: None
574ed2deddSopenharmony_ci# 在大括号前换行: Attach(始终将大括号附加到周围的上下文), Linux(除函数、命名空间和类定义,与Attach类似),
584ed2deddSopenharmony_ci#   Mozilla(除枚举、函数、记录定义,与Attach类似), Stroustrup(除函数定义、catch、else,与Attach类似),
594ed2deddSopenharmony_ci#   Allman(总是在大括号前换行), GNU(总是在大括号前换行,并对于控制语句的大括号增加额外的缩进), WebKit(在函数前换行), Custom
604ed2deddSopenharmony_ci#   注:这里认为语句块也属于函数
614ed2deddSopenharmony_ciBreakBeforeBraces: Custom
624ed2deddSopenharmony_ci# 在三元运算符前换行
634ed2deddSopenharmony_ciBreakBeforeTernaryOperators: true
644ed2deddSopenharmony_ci# 在构造函数的初始化列表的逗号前换行
654ed2deddSopenharmony_ciBreakConstructorInitializersBeforeComma: false
664ed2deddSopenharmony_ci# 每行字符的限制,0表示没有限制
674ed2deddSopenharmony_ciColumnLimit: 120
684ed2deddSopenharmony_ci# 描述具有特殊意义的注释的正则表达式,它不应该被分割为多行或以其它方式改变
694ed2deddSopenharmony_ciCommentPragmas: "^ IWYU pragma:"
704ed2deddSopenharmony_ci# 构造函数的初始化列表要么都在同一行,要么都各自一行
714ed2deddSopenharmony_ciConstructorInitializerAllOnOneLineOrOnePerLine: true
724ed2deddSopenharmony_ci# 构造函数的初始化列表的缩进宽度
734ed2deddSopenharmony_ciConstructorInitializerIndentWidth: 4
744ed2deddSopenharmony_ci# 延续的行的缩进宽度
754ed2deddSopenharmony_ciContinuationIndentWidth: 4
764ed2deddSopenharmony_ci# 去除C++11的列表初始化的大括号{后和}前的空格
774ed2deddSopenharmony_ciCpp11BracedListStyle: true
784ed2deddSopenharmony_ci# 继承最常用的指针和引用的对齐方式
794ed2deddSopenharmony_ciDerivePointerAlignment: false
804ed2deddSopenharmony_ci# 关闭格式化
814ed2deddSopenharmony_ciDisableFormat: false
824ed2deddSopenharmony_ci# 自动检测函数的调用和定义是否被格式为每行一个参数(Experimental)
834ed2deddSopenharmony_ciExperimentalAutoDetectBinPacking: false
844ed2deddSopenharmony_ci# 需要被解读为foreach循环而不是函数调用的宏
854ed2deddSopenharmony_ciForEachMacros: [foreach, Q_FOREACH, BOOST_FOREACH]
864ed2deddSopenharmony_ci# 对#include进行排序,匹配了某正则表达式的#include拥有对应的优先级,匹配不到的则默认优先级为INT_MAX(优先级越小排序越靠前),
874ed2deddSopenharmony_ci# 可以定义负数优先级从而保证某些#include永远在最前面
884ed2deddSopenharmony_ciIncludeCategories:
894ed2deddSopenharmony_ci  - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
904ed2deddSopenharmony_ci    Priority: 2
914ed2deddSopenharmony_ci  - Regex: '^(<|"(gtest|isl|json)/)'
924ed2deddSopenharmony_ci    Priority: 3
934ed2deddSopenharmony_ci  - Regex: ".*"
944ed2deddSopenharmony_ci    Priority: 1
954ed2deddSopenharmony_ci# 缩进case标签
964ed2deddSopenharmony_ciIndentCaseLabels: true
974ed2deddSopenharmony_ci# 缩进宽度
984ed2deddSopenharmony_ciIndentWidth: 4
994ed2deddSopenharmony_ci# 函数返回类型换行时,缩进函数声明或函数定义的函数名
1004ed2deddSopenharmony_ciIndentWrappedFunctionNames: true
1014ed2deddSopenharmony_ci# 保留在块开始处的空行
1024ed2deddSopenharmony_ciKeepEmptyLinesAtTheStartOfBlocks: true
1034ed2deddSopenharmony_ci# 开始一个块的宏的正则表达式
1044ed2deddSopenharmony_ciMacroBlockBegin: ""
1054ed2deddSopenharmony_ci# 结束一个块的宏的正则表达式
1064ed2deddSopenharmony_ciMacroBlockEnd: ""
1074ed2deddSopenharmony_ci# 连续空行的最大数量
1084ed2deddSopenharmony_ciMaxEmptyLinesToKeep: 1
1094ed2deddSopenharmony_ci# 命名空间的缩进: None, Inner(缩进嵌套的命名空间中的内容), All
1104ed2deddSopenharmony_ciNamespaceIndentation: None
1114ed2deddSopenharmony_ci# 使用ObjC块时缩进宽度
1124ed2deddSopenharmony_ciObjCBlockIndentWidth: 4
1134ed2deddSopenharmony_ci# 在ObjC的@property后添加一个空格
1144ed2deddSopenharmony_ciObjCSpaceAfterProperty: false
1154ed2deddSopenharmony_ci# 在ObjC的protocol列表前添加一个空格
1164ed2deddSopenharmony_ciObjCSpaceBeforeProtocolList: true
1174ed2deddSopenharmony_ci# 在call(后对函数调用换行的penalty
1184ed2deddSopenharmony_ciPenaltyBreakBeforeFirstCallParameter: 19
1194ed2deddSopenharmony_ci# 在一个注释中引入换行的penalty
1204ed2deddSopenharmony_ciPenaltyBreakComment: 300
1214ed2deddSopenharmony_ci# 第一次在<<前换行的penalty
1224ed2deddSopenharmony_ciPenaltyBreakFirstLessLess: 120
1234ed2deddSopenharmony_ci# 在一个字符串字面量中引入换行的penalty
1244ed2deddSopenharmony_ciPenaltyBreakString: 1000
1254ed2deddSopenharmony_ci# 对于每个在行字符数限制之外的字符的penalt
1264ed2deddSopenharmony_ciPenaltyExcessCharacter: 1000000
1274ed2deddSopenharmony_ci# 将函数的返回类型放到它自己的行的penalty
1284ed2deddSopenharmony_ciPenaltyReturnTypeOnItsOwnLine: 60
1294ed2deddSopenharmony_ci# 指针和引用的对齐: Left, Right, Middle
1304ed2deddSopenharmony_ciPointerAlignment: Left
1314ed2deddSopenharmony_ci# 允许重新排版注释
1324ed2deddSopenharmony_ciReflowComments: true
1334ed2deddSopenharmony_ci# 允许排序#include
1344ed2deddSopenharmony_ciSortIncludes: true
1354ed2deddSopenharmony_ci# 在C风格类型转换后添加空格
1364ed2deddSopenharmony_ciSpaceAfterCStyleCast: false
1374ed2deddSopenharmony_ci# 在赋值运算符之前添加空格
1384ed2deddSopenharmony_ciSpaceBeforeAssignmentOperators: true
1394ed2deddSopenharmony_ci# 开圆括号之前添加一个空格: Never, ControlStatements, Always
1404ed2deddSopenharmony_ciSpaceBeforeParens: ControlStatements
1414ed2deddSopenharmony_ci# 在空的圆括号中添加空格
1424ed2deddSopenharmony_ciSpaceInEmptyParentheses: false
1434ed2deddSopenharmony_ci# 在尾随的评论前添加的空格数(只适用于//)
1444ed2deddSopenharmony_ciSpacesBeforeTrailingComments: 1
1454ed2deddSopenharmony_ci# 在尖括号的<后和>前添加空格
1464ed2deddSopenharmony_ciSpacesInAngles: false
1474ed2deddSopenharmony_ci# 在容器(ObjC和JavaScript的数组和字典等)字面量中添加空格
1484ed2deddSopenharmony_ciSpacesInContainerLiterals: true
1494ed2deddSopenharmony_ci# 在C风格类型转换的括号中添加空格
1504ed2deddSopenharmony_ciSpacesInCStyleCastParentheses: false
1514ed2deddSopenharmony_ci# 在圆括号的(后和)前添加空格
1524ed2deddSopenharmony_ciSpacesInParentheses: false
1534ed2deddSopenharmony_ci# 在方括号的[后和]前添加空格,lamda表达式和未指明大小的数组的声明不受影响
1544ed2deddSopenharmony_ciSpacesInSquareBrackets: false
1554ed2deddSopenharmony_ci# 标准: Cpp03, Cpp11, Auto
1564ed2deddSopenharmony_ciStandard: Cpp11
1574ed2deddSopenharmony_ci# tab宽度
1584ed2deddSopenharmony_ciTabWidth: 4
1594ed2deddSopenharmony_ci# 使用tab字符: Never, ForIndentation, ForContinuationAndIndentation, Always
1604ed2deddSopenharmony_ciUseTab: Never
161