2021-08-30 10:54:38 +08:00
|
|
|
|
BasedOnStyle: WebKit
|
|
|
|
|
|
# 访问说明符的偏移(public private)
|
2021-09-06 09:18:15 +08:00
|
|
|
|
AccessModifierOffset: -4
|
2021-08-30 10:54:38 +08:00
|
|
|
|
# 括号之后,水平对齐参数: Align DontAlign AlwaysBreak。
|
|
|
|
|
|
AlignAfterOpenBracket: Align
|
|
|
|
|
|
#AlignConsecutiveBitFields: false
|
|
|
|
|
|
# 连续的赋值时,对齐所有的等号
|
|
|
|
|
|
AlignConsecutiveAssignments: false
|
|
|
|
|
|
# 连续声明时,对齐所有声明的变量名
|
|
|
|
|
|
AlignConsecutiveDeclarations: false
|
|
|
|
|
|
#AlignConsecutiveMacros: false
|
|
|
|
|
|
AlignEscapedNewlines: DontAlign
|
|
|
|
|
|
# 水平对齐二元和三元表达式的操作数
|
|
|
|
|
|
AlignOperands: true
|
|
|
|
|
|
# 对齐连续的尾随的注释
|
|
|
|
|
|
AlignTrailingComments: false
|
|
|
|
|
|
#AllowAllArgumentsOnNextLine: false
|
|
|
|
|
|
#AllowAllConstructorInitializersOnNextLine: false
|
|
|
|
|
|
# 允许函数声明的所有参数在放在下一行
|
|
|
|
|
|
AllowAllParametersOfDeclarationOnNextLine: false
|
|
|
|
|
|
# 允许短的块放在同一行
|
|
|
|
|
|
AllowShortBlocksOnASingleLine: true
|
|
|
|
|
|
# 允许短的case标签放在同一行
|
|
|
|
|
|
AllowShortCaseLabelsOnASingleLine: false
|
|
|
|
|
|
#AllowShortEnumsOnASingleLine: false
|
|
|
|
|
|
# 允许短的函数放在同一行: None, InlineOnly(定义在类中), Empty(空函数), Inline(定义在类中,空函数), All
|
|
|
|
|
|
AllowShortFunctionsOnASingleLine: InlineOnly
|
|
|
|
|
|
# 是否允许短if单行 If true, if (a) return; 可以放到同一行
|
2021-09-06 09:18:15 +08:00
|
|
|
|
AllowShortIfStatementsOnASingleLine: false
|
2021-08-30 10:54:38 +08:00
|
|
|
|
#AllowShortLambdasOnASingleLine: Inline
|
|
|
|
|
|
# 允许短的循环保持在同一行
|
|
|
|
|
|
AllowShortLoopsOnASingleLine: false
|
|
|
|
|
|
# 总是在定义返回类型后换行(deprecated)
|
|
|
|
|
|
AlwaysBreakAfterDefinitionReturnType: None
|
|
|
|
|
|
AlwaysBreakBeforeMultilineStrings: false
|
|
|
|
|
|
AlwaysBreakTemplateDeclarations: Yes
|
|
|
|
|
|
BinPackArguments: true
|
|
|
|
|
|
BinPackParameters: true
|
|
|
|
|
|
BreakBeforeBraces: Custom
|
|
|
|
|
|
BraceWrapping:
|
2021-09-06 09:18:15 +08:00
|
|
|
|
# AfterCaseLabel: false
|
|
|
|
|
|
AfterClass: true
|
2021-08-30 10:54:38 +08:00
|
|
|
|
AfterControlStatement: false
|
|
|
|
|
|
AfterEnum: false
|
2021-09-06 09:18:15 +08:00
|
|
|
|
AfterFunction: true
|
2021-08-30 10:54:38 +08:00
|
|
|
|
AfterNamespace: false
|
|
|
|
|
|
AfterStruct: false
|
|
|
|
|
|
AfterUnion: false
|
|
|
|
|
|
AfterExternBlock: false
|
|
|
|
|
|
BeforeCatch: false
|
|
|
|
|
|
BeforeElse: false
|
2021-09-06 09:18:15 +08:00
|
|
|
|
# BeforeLambdaBody: false
|
|
|
|
|
|
# BeforeWhile: false
|
2021-08-30 10:54:38 +08:00
|
|
|
|
SplitEmptyFunction: true
|
|
|
|
|
|
SplitEmptyRecord: true
|
|
|
|
|
|
SplitEmptyNamespace: true
|
|
|
|
|
|
|
|
|
|
|
|
BreakBeforeBinaryOperators: NonAssignment
|
|
|
|
|
|
BreakBeforeTernaryOperators: true
|
|
|
|
|
|
#在构造函数初始化时按逗号断行,并以冒号对齐
|
|
|
|
|
|
BreakConstructorInitializers: BeforeComma
|
|
|
|
|
|
BreakInheritanceList: BeforeComma
|
|
|
|
|
|
BreakStringLiterals: false
|
|
|
|
|
|
# 每行字符的限制,0表示没有限制
|
2021-09-24 16:57:29 +08:00
|
|
|
|
ColumnLimit: 120
|
2021-08-30 10:54:38 +08:00
|
|
|
|
# 描述具有特殊意义的注释的正则表达式,它不应该被分割为多行或以其它方式改变
|
|
|
|
|
|
# CommentPragmas: '^ IWYU pragma:'
|
|
|
|
|
|
# 语言: None Cpp Java Objc Protp
|
|
|
|
|
|
CompactNamespaces: false
|
|
|
|
|
|
Cpp11BracedListStyle: true
|
|
|
|
|
|
#DeriveLineEnding: \n
|
|
|
|
|
|
DerivePointerAlignment: false
|
|
|
|
|
|
FixNamespaceComments: true
|
|
|
|
|
|
ForEachMacros: [ "foreach", "Q_FOREACH" ]
|
|
|
|
|
|
IncludeBlocks: Regroup
|
|
|
|
|
|
IncludeCategories:
|
|
|
|
|
|
- Regex: '^"'
|
|
|
|
|
|
Priority: 1
|
|
|
|
|
|
- Regex: '^["<]D'
|
|
|
|
|
|
Priority: 2
|
|
|
|
|
|
- Regex: '^<Q'
|
|
|
|
|
|
Priority: 3
|
|
|
|
|
|
- Regex: '^<'
|
|
|
|
|
|
Priority: 4
|
|
|
|
|
|
- Regex: '\.h>$'
|
|
|
|
|
|
Priority: 5
|
|
|
|
|
|
- Regex: '^"moc_'
|
|
|
|
|
|
Priority: 99
|
|
|
|
|
|
- Regex: '\.moc"'
|
|
|
|
|
|
Priority: 99
|
|
|
|
|
|
|
|
|
|
|
|
# 缩进case 标签
|
|
|
|
|
|
IndentCaseLabels: false
|
|
|
|
|
|
#IndentExternBlock: NoIndent
|
|
|
|
|
|
#IndentCaseBlocks: false
|
|
|
|
|
|
#IndentGotoLabels: false
|
|
|
|
|
|
IndentPPDirectives: None
|
|
|
|
|
|
#缩进宽度
|
|
|
|
|
|
IndentWidth: 4
|
|
|
|
|
|
IndentWrappedFunctionNames: false
|
|
|
|
|
|
#InsertTrailingCommas: None
|
|
|
|
|
|
#在block从空行开始
|
|
|
|
|
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
|
|
|
|
|
Language: Cpp
|
|
|
|
|
|
# 连续的空行保留几行
|
|
|
|
|
|
MaxEmptyLinesToKeep: 1
|
|
|
|
|
|
NamespaceIndentation: None
|
|
|
|
|
|
#指针的*的挨着哪边
|
|
|
|
|
|
PointerAlignment: Right
|
|
|
|
|
|
# 允许排序#include, 造成编译错误
|
|
|
|
|
|
SortIncludes: false
|
|
|
|
|
|
SortUsingDeclarations: false
|
|
|
|
|
|
#括号后添加空格
|
|
|
|
|
|
SpaceAfterCStyleCast: false
|
|
|
|
|
|
#SpaceAfterLogicalNot: false
|
|
|
|
|
|
SpaceAfterTemplateKeyword: false
|
|
|
|
|
|
#等号两边的空格
|
|
|
|
|
|
SpaceBeforeAssignmentOperators: true
|
|
|
|
|
|
SpaceBeforeCpp11BracedList: true
|
|
|
|
|
|
SpaceBeforeCtorInitializerColon: false
|
|
|
|
|
|
SpaceBeforeParens: ControlStatements
|
|
|
|
|
|
SpaceBeforeRangeBasedForLoopColon: true
|
|
|
|
|
|
#SpaceBeforeSquareBrackets: false
|
|
|
|
|
|
#SpaceInEmptyBlock: true
|
|
|
|
|
|
SpaceInEmptyParentheses: false
|
2021-09-06 09:18:15 +08:00
|
|
|
|
SpacesBeforeTrailingComments: 1
|
2021-08-30 10:54:38 +08:00
|
|
|
|
SpacesInAngles: false
|
|
|
|
|
|
SpacesInCStyleCastParentheses: false
|
|
|
|
|
|
#SpacesInConditionalStatement: false
|
|
|
|
|
|
# 容器类的空格 例如 OC的字典
|
|
|
|
|
|
SpacesInContainerLiterals: false
|
|
|
|
|
|
# 小括号两边添加空格
|
|
|
|
|
|
SpacesInParentheses: false
|
|
|
|
|
|
# 中括号两边空格 []
|
|
|
|
|
|
SpacesInSquareBrackets: false
|
|
|
|
|
|
#StatementMacros: ["Q_UNUSED"]
|
|
|
|
|
|
#tab键盘的宽度
|
|
|
|
|
|
TabWidth: 4
|
2021-09-06 09:18:15 +08:00
|
|
|
|
UseTab: Never
|