|
@@ -1,7 +1,7 @@
|
|
---
|
|
---
|
|
# 语言: None, Cpp, Java, JavaScript, ObjC, Proto, TableGen, TextProto
|
|
# 语言: None, Cpp, Java, JavaScript, ObjC, Proto, TableGen, TextProto
|
|
-Language: Cpp
|
|
|
|
-# BasedOnStyle: LLVM
|
|
|
|
|
|
+Language: Cpp
|
|
|
|
+BasedOnStyle: Google
|
|
# 访问说明符(public、private等)的偏移
|
|
# 访问说明符(public、private等)的偏移
|
|
AccessModifierOffset: -4
|
|
AccessModifierOffset: -4
|
|
# 开括号(开圆括号、开尖括号、开方括号)后的对齐: Align, DontAlign, AlwaysBreak(总是在开括号后换行)
|
|
# 开括号(开圆括号、开尖括号、开方括号)后的对齐: Align, DontAlign, AlwaysBreak(总是在开括号后换行)
|
|
@@ -9,24 +9,44 @@ AlignAfterOpenBracket: Align
|
|
# 对齐数组列
|
|
# 对齐数组列
|
|
AlignArrayOfStructures: None
|
|
AlignArrayOfStructures: None
|
|
# 对齐连续宏定义
|
|
# 对齐连续宏定义
|
|
-AlignConsecutiveMacros: true
|
|
|
|
|
|
+AlignConsecutiveMacros: #AcrossEmptyLinesAndComments
|
|
|
|
+ Enabled: true
|
|
|
|
+ AcrossEmptyLines: true
|
|
|
|
+ AcrossComments: false
|
|
|
|
+ AlignCompound: false
|
|
|
|
+ PadOperators: false
|
|
# 连续赋值时,对齐所有等号
|
|
# 连续赋值时,对齐所有等号
|
|
-AlignConsecutiveAssignments: true
|
|
|
|
|
|
+AlignConsecutiveAssignments:
|
|
|
|
+ Enabled: true
|
|
|
|
+ AcrossEmptyLines: false
|
|
|
|
+ AcrossComments: false
|
|
|
|
+ AlignCompound: false
|
|
|
|
+ PadOperators: false
|
|
# 对齐连续位字段
|
|
# 对齐连续位字段
|
|
-AlignConsecutiveBitFields: true
|
|
|
|
|
|
+AlignConsecutiveBitFields:
|
|
|
|
+ Enabled: true
|
|
|
|
+ AcrossEmptyLines: false
|
|
|
|
+ AcrossComments: false
|
|
|
|
+ AlignCompound: false
|
|
|
|
+ PadOperators: false
|
|
# 连续声明时,对齐所有声明的变量名
|
|
# 连续声明时,对齐所有声明的变量名
|
|
-AlignConsecutiveDeclarations: true
|
|
|
|
|
|
+AlignConsecutiveDeclarations:
|
|
|
|
+ Enabled: true
|
|
|
|
+ AcrossEmptyLines: false
|
|
|
|
+ AcrossComments: false
|
|
|
|
+ AlignCompound: false
|
|
|
|
+ PadOperators: false
|
|
# 左对齐逃脱换行(使用反斜杠换行)的反斜杠
|
|
# 左对齐逃脱换行(使用反斜杠换行)的反斜杠
|
|
-AlignEscapedNewlines: Right
|
|
|
|
|
|
+AlignEscapedNewlines: Left
|
|
# 水平对齐二元和三元表达式的操作数
|
|
# 水平对齐二元和三元表达式的操作数
|
|
AllowAllArgumentsOnNextLine: true
|
|
AllowAllArgumentsOnNextLine: true
|
|
AllowAllConstructorInitializersOnNextLine: true
|
|
AllowAllConstructorInitializersOnNextLine: true
|
|
AlwaysBreakAfterDefinitionReturnType: None
|
|
AlwaysBreakAfterDefinitionReturnType: None
|
|
-AlignOperands: Align
|
|
|
|
|
|
+AlignOperands: true #Align
|
|
# 对齐连续的尾随的注释
|
|
# 对齐连续的尾随的注释
|
|
AlignTrailingComments: true
|
|
AlignTrailingComments: true
|
|
# 允许函数声明的所有参数在放在下一行
|
|
# 允许函数声明的所有参数在放在下一行
|
|
-AllowAllParametersOfDeclarationOnNextLine: true
|
|
|
|
|
|
+AllowAllParametersOfDeclarationOnNextLine: false
|
|
# 允许短的枚举放在同一行
|
|
# 允许短的枚举放在同一行
|
|
AllowShortEnumsOnASingleLine: true
|
|
AllowShortEnumsOnASingleLine: true
|
|
# 允许短的块放在同一行
|
|
# 允许短的块放在同一行
|
|
@@ -34,7 +54,7 @@ AllowShortBlocksOnASingleLine: Never
|
|
# 允许短的case标签放在同一行
|
|
# 允许短的case标签放在同一行
|
|
AllowShortCaseLabelsOnASingleLine: false
|
|
AllowShortCaseLabelsOnASingleLine: false
|
|
# 允许短的函数放在同一行
|
|
# 允许短的函数放在同一行
|
|
-AllowShortFunctionsOnASingleLine: All
|
|
|
|
|
|
+AllowShortFunctionsOnASingleLine: false #All
|
|
# 允许短的匿名函数放在同一行
|
|
# 允许短的匿名函数放在同一行
|
|
AllowShortLambdasOnASingleLine: All
|
|
AllowShortLambdasOnASingleLine: All
|
|
# 允许短的if语句保持在同一行
|
|
# 允许短的if语句保持在同一行
|
|
@@ -47,142 +67,138 @@ AlwaysBreakAfterReturnType: None
|
|
AlwaysBreakBeforeMultilineStrings: false
|
|
AlwaysBreakBeforeMultilineStrings: false
|
|
# 总是在template声明后换行
|
|
# 总是在template声明后换行
|
|
AlwaysBreakTemplateDeclarations: MultiLine
|
|
AlwaysBreakTemplateDeclarations: MultiLine
|
|
|
|
+# 属性声明相关配置
|
|
AttributeMacros:
|
|
AttributeMacros:
|
|
- __capability
|
|
- __capability
|
|
# false表示函数实参要么都在同一行,要么都各自一行
|
|
# false表示函数实参要么都在同一行,要么都各自一行
|
|
BinPackArguments: true
|
|
BinPackArguments: true
|
|
# false表示所有形参要么都在同一行,要么都各自一行
|
|
# false表示所有形参要么都在同一行,要么都各自一行
|
|
BinPackParameters: true
|
|
BinPackParameters: true
|
|
-# 大括号换行,只有当BreakBeforeBraces设置为Custom时才有效
|
|
|
|
|
|
+# 是否允许短方法单行,只有一行的函数将不会分行,直接写在函数名后
|
|
|
|
+# 括号是分行,还是不分行,只有当 BreakBeforeBraces 设置为 Custom 时才有效
|
|
BraceWrapping:
|
|
BraceWrapping:
|
|
- AfterCaseLabel: false
|
|
|
|
- AfterClass: false
|
|
|
|
- AfterControlStatement: Never
|
|
|
|
- AfterEnum: false
|
|
|
|
- AfterFunction: false
|
|
|
|
- AfterNamespace: false
|
|
|
|
- AfterObjCDeclaration: false
|
|
|
|
- AfterStruct: false
|
|
|
|
- AfterUnion: false
|
|
|
|
|
|
+ AfterCaseLabel: true
|
|
|
|
+ # class 定义后面
|
|
|
|
+ AfterClass: true
|
|
|
|
+ # 控制语句后面
|
|
|
|
+ AfterControlStatement: true
|
|
|
|
+ AfterEnum: true
|
|
|
|
+ AfterFunction: true
|
|
|
|
+ AfterNamespace: true
|
|
|
|
+ AfterObjCDeclaration: true
|
|
|
|
+ AfterStruct: true
|
|
|
|
+ AfterUnion: true
|
|
AfterExternBlock: false
|
|
AfterExternBlock: false
|
|
- BeforeCatch: false
|
|
|
|
- BeforeElse: false
|
|
|
|
- BeforeLambdaBody: false
|
|
|
|
- BeforeWhile: false
|
|
|
|
- IndentBraces: false
|
|
|
|
|
|
+ BeforeCatch: true
|
|
|
|
+ BeforeElse: true
|
|
|
|
+ # 缩进大括号
|
|
|
|
+ IndentBraces: false
|
|
SplitEmptyFunction: true
|
|
SplitEmptyFunction: true
|
|
SplitEmptyRecord: true
|
|
SplitEmptyRecord: true
|
|
SplitEmptyNamespace: true
|
|
SplitEmptyNamespace: true
|
|
-# 在二元运算符前换行
|
|
|
|
BreakBeforeBinaryOperators: None
|
|
BreakBeforeBinaryOperators: None
|
|
-# 在concept前换行
|
|
|
|
-BreakBeforeConceptDeclarations: true
|
|
|
|
-# 在大括号前换行: Attach(始终将大括号附加到周围的上下文)
|
|
|
|
-BreakBeforeBraces: Allman
|
|
|
|
|
|
+# BreakAfterAttributes: Never
|
|
|
|
+# BreakArrays: true
|
|
|
|
+# BreakBeforeConceptDeclarations: Always
|
|
|
|
+BreakBeforeBraces: Custom
|
|
BreakBeforeInheritanceComma: false
|
|
BreakBeforeInheritanceComma: false
|
|
-# 继承列表样式
|
|
|
|
-BreakInheritanceList: AfterComma
|
|
|
|
-# 在三元运算符前换行
|
|
|
|
|
|
+BreakInheritanceList: BeforeColon
|
|
|
|
+# 三元运算符换行后在前
|
|
BreakBeforeTernaryOperators: true
|
|
BreakBeforeTernaryOperators: true
|
|
-# 构造函数初始值设定项换行样式
|
|
|
|
-BreakConstructorInitializers: BeforeComma
|
|
|
|
-# 在java字段的注释后换行
|
|
|
|
|
|
+BreakConstructorInitializersBeforeComma: false
|
|
|
|
+# 构造函数初始化列表换行规则
|
|
|
|
+BreakConstructorInitializers: BeforeColon
|
|
BreakAfterJavaFieldAnnotations: false
|
|
BreakAfterJavaFieldAnnotations: false
|
|
-# 每行字符的限制,0表示没有限制
|
|
|
|
-ColumnLimit: 0
|
|
|
|
-# 描述具有特殊意义的注释的正则表达式,它不应该被分割为多行或以其它方式改变
|
|
|
|
-CommentPragmas: '^ IWYU pragma:'
|
|
|
|
-# 在新行上声明每个命名空间
|
|
|
|
|
|
+BreakStringLiterals: true
|
|
|
|
+# 代码最大列数
|
|
|
|
+ColumnLimit: 0
|
|
|
|
+CommentPragmas: "^ IWYU pragma:"
|
|
CompactNamespaces: false
|
|
CompactNamespaces: false
|
|
-# 构造函数的初始化列表的缩进宽度
|
|
|
|
|
|
+ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
|
|
|
+# 构造函数初始化列表和继承列表换行后缩进的字符数,无符号整数。
|
|
ConstructorInitializerIndentWidth: 4
|
|
ConstructorInitializerIndentWidth: 4
|
|
-# 延续的行的缩进宽度
|
|
|
|
|
|
+# 当一行代码放不下,自动换行后的缩进
|
|
ContinuationIndentWidth: 4
|
|
ContinuationIndentWidth: 4
|
|
-# 去除C++11的列表初始化的大括号{后和}前的空格
|
|
|
|
|
|
+# 大括号列表附近是否有空格{ 1, 2 }/{1, 2}
|
|
Cpp11BracedListStyle: true
|
|
Cpp11BracedListStyle: true
|
|
-# 继承最常用的换行方式
|
|
|
|
DeriveLineEnding: true
|
|
DeriveLineEnding: true
|
|
-# 继承最常用的指针和引用的对齐方式
|
|
|
|
DerivePointerAlignment: false
|
|
DerivePointerAlignment: false
|
|
-# 关闭格式化
|
|
|
|
-DisableFormat: false
|
|
|
|
-# 删除访问修饰符后的所有空行
|
|
|
|
|
|
+# 设置位false后可以使用// clang-format off .. // clang-format on注释禁用某段代码格式化
|
|
|
|
+DisableFormat: false
|
|
|
|
+# 类中访问修饰符后放置空行
|
|
EmptyLineAfterAccessModifier: Never
|
|
EmptyLineAfterAccessModifier: Never
|
|
-# 仅当访问修饰符开始一个新的逻辑块时才添加空行
|
|
|
|
|
|
+# 类中访问修饰符之前放置空行
|
|
EmptyLineBeforeAccessModifier: LogicalBlock
|
|
EmptyLineBeforeAccessModifier: LogicalBlock
|
|
-# 自动检测函数的调用和定义是否被格式为每行一个参数(Experimental)
|
|
|
|
ExperimentalAutoDetectBinPacking: false
|
|
ExperimentalAutoDetectBinPacking: false
|
|
-# 自动补充namespace注释
|
|
|
|
|
|
+# 自动修复命名空间注释名称
|
|
FixNamespaceComments: true
|
|
FixNamespaceComments: true
|
|
-# 需要被解读为foreach循环而不是函数调用的宏
|
|
|
|
ForEachMacros:
|
|
ForEachMacros:
|
|
|
|
+ - forever
|
|
- foreach
|
|
- foreach
|
|
- Q_FOREACH
|
|
- Q_FOREACH
|
|
- BOOST_FOREACH
|
|
- BOOST_FOREACH
|
|
IfMacros:
|
|
IfMacros:
|
|
- KJ_IF_MAYBE
|
|
- KJ_IF_MAYBE
|
|
-# 多个#include块合并在一起并排序为一个
|
|
|
|
-IncludeBlocks: Merge
|
|
|
|
-# 可以定义负数优先级从而保证某些#include永远在最前面
|
|
|
|
|
|
+# 头文件分类排序
|
|
|
|
+IncludeBlocks: Preserve
|
|
IncludeCategories:
|
|
IncludeCategories:
|
|
- - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
|
|
|
- Priority: 2
|
|
|
|
- SortPriority: 0
|
|
|
|
- CaseSensitive: false
|
|
|
|
- - Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
|
|
|
- Priority: 3
|
|
|
|
- SortPriority: 0
|
|
|
|
- CaseSensitive: false
|
|
|
|
- - Regex: '.*'
|
|
|
|
- Priority: 1
|
|
|
|
- SortPriority: 0
|
|
|
|
- CaseSensitive: false
|
|
|
|
-IncludeIsMainRegex: '(Test)?$'
|
|
|
|
-IncludeIsMainSourceRegex: ''
|
|
|
|
-# 缩进访问修饰符
|
|
|
|
|
|
+ - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
|
|
|
+ Priority: 2
|
|
|
|
+ SortPriority: 0
|
|
|
|
+ - Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
|
|
|
+ Priority: 3
|
|
|
|
+ SortPriority: 0
|
|
|
|
+ - Regex: ".*"
|
|
|
|
+ Priority: 1
|
|
|
|
+ SortPriority: 0
|
|
|
|
+IncludeIsMainRegex: "(Test)?$"
|
|
|
|
+IncludeIsMainSourceRegex: ""
|
|
|
|
+# 指定访问修饰符是否应具有自己的缩进级别
|
|
IndentAccessModifiers: false
|
|
IndentAccessModifiers: false
|
|
-# 缩进case标签
|
|
|
|
-IndentCaseLabels: false
|
|
|
|
-# case 标签后面的块使用与 case 标签相同的缩进级别
|
|
|
|
-IndentCaseBlocks: false
|
|
|
|
-# 缩进goto标签。
|
|
|
|
-IndentGotoLabels: false
|
|
|
|
-# 缩进预处理器指令
|
|
|
|
-IndentPPDirectives: None
|
|
|
|
-# 向后兼容缩进外部块
|
|
|
|
|
|
+# case的{}缩进
|
|
|
|
+IndentCaseBlocks: true
|
|
|
|
+# case的标签是否缩进
|
|
|
|
+IndentCaseLabels: true
|
|
IndentExternBlock: AfterExternBlock
|
|
IndentExternBlock: AfterExternBlock
|
|
-# 缩进模板中的requires子句
|
|
|
|
-IndentRequires: false
|
|
|
|
-# 缩进宽度
|
|
|
|
-IndentWidth: 4
|
|
|
|
-# 函数返回类型换行时,缩进函数声明或函数定义的函数名
|
|
|
|
|
|
+IndentGotoLabels: true
|
|
|
|
+# 预处理器指令缩进样式
|
|
|
|
+IndentPPDirectives: None
|
|
|
|
+IndentRequiresClause: true
|
|
|
|
+# 换行缩进字符数
|
|
|
|
+IndentWidth: 4
|
|
IndentWrappedFunctionNames: false
|
|
IndentWrappedFunctionNames: false
|
|
-# 插入尾随逗号
|
|
|
|
-InsertTrailingCommas: None
|
|
|
|
-# 保留JavaScript字符串引号
|
|
|
|
|
|
+# 控制语句(if、else、for、do和while)后面自动插入大括号(危险,可能导致代码错误)
|
|
|
|
+InsertBraces: false
|
|
|
|
+# InsertNewlineAtEOF: false
|
|
|
|
+# 仅适用于 JavaScript
|
|
|
|
+# InsertTrailingCommas: None
|
|
|
|
+# IntegerLiteralSeparator: # 格式化整数文字分隔符
|
|
|
|
+# Binary: 4 # 二进制文本中的分隔符格式,按4位分割
|
|
|
|
+# BinaryMinDigits: 0 # 达到多少位二进制文本才进行分割
|
|
|
|
+# Decimal: 3 # 以十进制文字格式设置分隔符的格式。
|
|
|
|
+# DecimalMinDigits: 0 # 十进制最小分割位数
|
|
|
|
+# Hex: 2 # 十六进制文字格式分割个数
|
|
|
|
+# HexMinDigits: 0
|
|
JavaScriptQuotes: Leave
|
|
JavaScriptQuotes: Leave
|
|
-# 包装 JavaScript 导入/导出语句
|
|
|
|
JavaScriptWrapImports: true
|
|
JavaScriptWrapImports: true
|
|
-# 保留在块开始处的空行
|
|
|
|
KeepEmptyLinesAtTheStartOfBlocks: true
|
|
KeepEmptyLinesAtTheStartOfBlocks: true
|
|
-# 相对于 lambda 签名对齐 lambda 主体
|
|
|
|
|
|
+# lambda表达式换行、缩进样式样式
|
|
LambdaBodyIndentation: Signature
|
|
LambdaBodyIndentation: Signature
|
|
-# 开始一个块的宏的正则表达式
|
|
|
|
-MacroBlockBegin: ''
|
|
|
|
-# 结束一个块的宏的正则表达式
|
|
|
|
-MacroBlockEnd: ''
|
|
|
|
-# 连续空行的最大数量
|
|
|
|
|
|
+# 换行符样式
|
|
|
|
+# LineEnding: DeriveLF
|
|
|
|
+MacroBlockBegin: ""
|
|
|
|
+MacroBlockEnd: ""
|
|
|
|
+# 要保留的最大连续空行数
|
|
MaxEmptyLinesToKeep: 1
|
|
MaxEmptyLinesToKeep: 1
|
|
-# 命名空间的缩进
|
|
|
|
|
|
+# 命名空间缩进
|
|
NamespaceIndentation: None
|
|
NamespaceIndentation: None
|
|
ObjCBinPackProtocolList: Auto
|
|
ObjCBinPackProtocolList: Auto
|
|
-# 使用ObjC块时缩进宽度
|
|
|
|
-ObjCBlockIndentWidth: 4
|
|
|
|
|
|
+ObjCBlockIndentWidth: 0
|
|
ObjCBreakBeforeNestedBlockParam: true
|
|
ObjCBreakBeforeNestedBlockParam: true
|
|
-# 在ObjC的@property后添加一个空格
|
|
|
|
ObjCSpaceAfterProperty: false
|
|
ObjCSpaceAfterProperty: false
|
|
-# 在ObjC的protocol列表前添加一个空格
|
|
|
|
ObjCSpaceBeforeProtocolList: true
|
|
ObjCSpaceBeforeProtocolList: true
|
|
|
|
+# 设置初始化列表,和BreakConstructorInitializers 有一定冲突
|
|
|
|
+PackConstructorInitializers: BinPack
|
|
PenaltyBreakAssignment: 2
|
|
PenaltyBreakAssignment: 2
|
|
PenaltyBreakBeforeFirstCallParameter: 19
|
|
PenaltyBreakBeforeFirstCallParameter: 19
|
|
PenaltyBreakComment: 300
|
|
PenaltyBreakComment: 300
|
|
@@ -191,73 +207,76 @@ PenaltyBreakString: 1000
|
|
PenaltyBreakTemplateDeclaration: 10
|
|
PenaltyBreakTemplateDeclaration: 10
|
|
PenaltyExcessCharacter: 1000000
|
|
PenaltyExcessCharacter: 1000000
|
|
PenaltyReturnTypeOnItsOwnLine: 60
|
|
PenaltyReturnTypeOnItsOwnLine: 60
|
|
-PenaltyIndentedWhitespace: 0
|
|
|
|
-# 指针的对齐: Left, Right, Middle
|
|
|
|
|
|
+# 指针对齐风格
|
|
PointerAlignment: Right
|
|
PointerAlignment: Right
|
|
-# 缩进预处理器语句的列数
|
|
|
|
-PPIndentWidth: -1
|
|
|
|
-# 引用的对齐
|
|
|
|
-ReferenceAlignment: Pointer
|
|
|
|
-# 允许重新排版注释
|
|
|
|
-ReflowComments: true
|
|
|
|
-# 短命名空间跨越的最大展开行数
|
|
|
|
|
|
+ReflowComments: true
|
|
|
|
+PPIndentWidth: -1
|
|
|
|
+# 不同的排列说明符和限定符的方法(危险,可能改变代码含义)
|
|
|
|
+QualifierAlignment: Leave
|
|
|
|
+# 引用对齐风格
|
|
|
|
+# ReferenceAlignment: Pointer
|
|
|
|
+# RemoveBracesLLVM: false
|
|
|
|
+# RemoveSemicolon: false
|
|
|
|
+# RequiresClausePosition: OwnLine
|
|
|
|
+# RequiresExpressionIndentation: OuterScope
|
|
|
|
+# 指定使用空行分隔定义块,包括 类、结构、枚举和函数。
|
|
|
|
+SeparateDefinitionBlocks: Always
|
|
ShortNamespaceLines: 1
|
|
ShortNamespaceLines: 1
|
|
-# 允许排序#include
|
|
|
|
-SortIncludes: true
|
|
|
|
-# java静态导入放在非静态导入之前
|
|
|
|
|
|
+# 头文件排序规则
|
|
|
|
+SortIncludes: CaseSensitive
|
|
SortJavaStaticImport: Before
|
|
SortJavaStaticImport: Before
|
|
-# 对using声明排序
|
|
|
|
|
|
+# using声明排序 Lexicographic
|
|
SortUsingDeclarations: true
|
|
SortUsingDeclarations: true
|
|
-# 在C风格类型转换后添加空格
|
|
|
|
-SpaceAfterCStyleCast: false
|
|
|
|
-# 在!后添加空格
|
|
|
|
|
|
+# 定义在哪些情况下在左括号之前放置空格
|
|
|
|
+SpaceBeforeParens: Custom
|
|
|
|
+# 在C语言风格的强制类型转换后插入空格
|
|
|
|
+SpaceAfterCStyleCast: true
|
|
|
|
+# 不在逻辑运算符 !后插入控制
|
|
SpaceAfterLogicalNot: false
|
|
SpaceAfterLogicalNot: false
|
|
-# 在Template关键字后添加空格
|
|
|
|
SpaceAfterTemplateKeyword: true
|
|
SpaceAfterTemplateKeyword: true
|
|
-# 在赋值运算符之前添加空格
|
|
|
|
|
|
+SpaceAroundPointerQualifiers: Default
|
|
|
|
+# 赋值运算符前是否有空格
|
|
SpaceBeforeAssignmentOperators: true
|
|
SpaceBeforeAssignmentOperators: true
|
|
-# 不在case冒号之前添加空格
|
|
|
|
|
|
+# case的:前是否有空格
|
|
SpaceBeforeCaseColon: false
|
|
SpaceBeforeCaseColon: false
|
|
-# 不在C++11大括号列表之前添加空格
|
|
|
|
|
|
+# 调用构造函数时初始化列表的大括号前面是否有空格
|
|
SpaceBeforeCpp11BracedList: false
|
|
SpaceBeforeCpp11BracedList: false
|
|
-# 在构造函数初始化器冒号之前添加空格
|
|
|
|
|
|
+# 构造函数的:前面是否有空格
|
|
SpaceBeforeCtorInitializerColon: true
|
|
SpaceBeforeCtorInitializerColon: true
|
|
-# 在继承冒号前添加空格
|
|
|
|
|
|
+# 继承的:前面是否有空格
|
|
SpaceBeforeInheritanceColon: true
|
|
SpaceBeforeInheritanceColon: true
|
|
-# 开圆括号之前添加一个空格: Never, ControlStatements, Always
|
|
|
|
-SpaceBeforeParens: ControlStatements
|
|
|
|
-# 不要确保指针限定符周围有空格,而是使用 PointerAlignment
|
|
|
|
-SpaceAroundPointerQualifiers: Default
|
|
|
|
-# 在基于范围的for循环冒号之前添加空格
|
|
|
|
|
|
+# 函数调用时括号前添加空格
|
|
|
|
+# SpaceBeforeParentheses: true
|
|
|
|
+# 括号内部添加空格
|
|
|
|
+SpacesInParentheses: false
|
|
|
|
+# 范围的for循环冒号之前删除空格
|
|
SpaceBeforeRangeBasedForLoopColon: true
|
|
SpaceBeforeRangeBasedForLoopColon: true
|
|
-# {}中间不添加空格
|
|
|
|
SpaceInEmptyBlock: false
|
|
SpaceInEmptyBlock: false
|
|
-# 在空的圆括号中添加空格
|
|
|
|
SpaceInEmptyParentheses: false
|
|
SpaceInEmptyParentheses: false
|
|
-# 在尾随的评论前添加的空格数(只适用于//)
|
|
|
|
|
|
+# 尾部//注释之前的空格
|
|
SpacesBeforeTrailingComments: 1
|
|
SpacesBeforeTrailingComments: 1
|
|
-# 在尖括号的<后和>前添加空格
|
|
|
|
-SpacesInAngles: Never
|
|
|
|
-# 不在if/for/switch/while条件周围插入空格
|
|
|
|
|
|
+SpacesInAngles: false
|
|
SpacesInConditionalStatement: false
|
|
SpacesInConditionalStatement: false
|
|
-# 在容器(ObjC和JavaScript的数组和字典等)字面量中添加空格
|
|
|
|
SpacesInContainerLiterals: true
|
|
SpacesInContainerLiterals: true
|
|
-# 在C风格类型转换的括号中添加空格
|
|
|
|
SpacesInCStyleCastParentheses: false
|
|
SpacesInCStyleCastParentheses: false
|
|
-# 行注释开头允许有多少个空格。要禁用最大值,请将其设置为-1,除此之外,最大值优先于最小值
|
|
|
|
-SpacesInLineCommentPrefix:
|
|
|
|
- Minimum: 1
|
|
|
|
- Maximum: -1
|
|
|
|
-# 在圆括号的(后和)前添加空格
|
|
|
|
-SpacesInParentheses: false
|
|
|
|
-# 在方括号的[后和]前添加空格,lamda表达式和未指明大小的数组的声明不受影响
|
|
|
|
SpacesInSquareBrackets: false
|
|
SpacesInSquareBrackets: false
|
|
# 不在[前添加空格
|
|
# 不在[前添加空格
|
|
SpaceBeforeSquareBrackets: false
|
|
SpaceBeforeSquareBrackets: false
|
|
|
|
+# 单独控制不同情况下括号前面的空格,在SpaceBeforeParens==Custom时生效
|
|
|
|
+SpaceBeforeParensOptions:
|
|
|
|
+ AfterControlStatements: true
|
|
|
|
+ AfterForeachMacros: true
|
|
|
|
+ AfterFunctionDefinitionName: false
|
|
|
|
+ AfterFunctionDeclarationName: false
|
|
|
|
+ AfterIfMacros: true
|
|
|
|
+ AfterOverloadedOperator: true
|
|
|
|
+ AfterRequiresInClause: true
|
|
|
|
+ AfterRequiresInExpression: true
|
|
|
|
+ BeforeNonEmptyParentheses: true
|
|
# 位域:每边都添加空格
|
|
# 位域:每边都添加空格
|
|
BitFieldColonSpacing: Both
|
|
BitFieldColonSpacing: Both
|
|
-# 标准
|
|
|
|
-Standard: Latest
|
|
|
|
|
|
+# 标准 解析和格式化与此标准兼容的c++结构
|
|
|
|
+Standard: Latest
|
|
# 在语句前面被忽略的宏定义,就好像它们是一个属性一样
|
|
# 在语句前面被忽略的宏定义,就好像它们是一个属性一样
|
|
StatementAttributeLikeMacros:
|
|
StatementAttributeLikeMacros:
|
|
- Q_EMIT
|
|
- Q_EMIT
|
|
@@ -265,12 +284,49 @@ StatementAttributeLikeMacros:
|
|
StatementMacros:
|
|
StatementMacros:
|
|
- Q_UNUSED
|
|
- Q_UNUSED
|
|
- QT_REQUIRE_VERSION
|
|
- QT_REQUIRE_VERSION
|
|
|
|
+ - Q_CLASSINFO
|
|
|
|
+ - Q_ENUM
|
|
|
|
+ - Q_ENUM_NS
|
|
|
|
+ - Q_FLAG
|
|
|
|
+ - Q_FLAG_NS
|
|
|
|
+ - Q_GADGET
|
|
|
|
+ - Q_GADGET_EXPORT
|
|
|
|
+ - Q_INTERFACES
|
|
|
|
+ - Q_MOC_INCLUDE
|
|
|
|
+ - Q_NAMESPACE
|
|
|
|
+ - Q_NAMESPACE_EXPORT
|
|
|
|
+ - Q_OBJECT
|
|
|
|
+ - Q_PROPERTY
|
|
|
|
+ - Q_REVISION
|
|
|
|
+ - Q_DISABLE_COPY
|
|
|
|
+ - Q_SET_OBJECT_NAME
|
|
|
|
+ - QT_BEGIN_NAMESPACE
|
|
|
|
+ - QT_END_NAMESPACE
|
|
|
|
+ - QML_ADDED_IN_MINOR_VERSION
|
|
|
|
+ - QML_ANONYMOUS
|
|
|
|
+ - QML_ATTACHED
|
|
|
|
+ - QML_DECLARE_TYPE
|
|
|
|
+ - QML_DECLARE_TYPEINFO
|
|
|
|
+ - QML_ELEMENT
|
|
|
|
+ - QML_EXTENDED
|
|
|
|
+ - QML_EXTENDED_NAMESPACE
|
|
|
|
+ - QML_EXTRA_VERSION
|
|
|
|
+ - QML_FOREIGN
|
|
|
|
+ - QML_FOREIGN_NAMESPACE
|
|
|
|
+ - QML_IMPLEMENTS_INTERFACES
|
|
|
|
+ - QML_INTERFACE
|
|
|
|
+ - QML_NAMED_ELEMENT
|
|
|
|
+ - QML_REMOVED_IN_MINOR_VERSION
|
|
|
|
+ - QML_SINGLETON
|
|
|
|
+ - QML_UNAVAILABLE
|
|
|
|
+ - QML_UNCREATABLE
|
|
|
|
+ - QML_VALUE_TYPE
|
|
# tab宽度
|
|
# tab宽度
|
|
-TabWidth: 4
|
|
|
|
|
|
+TabWidth: 4
|
|
# 使用\n换行
|
|
# 使用\n换行
|
|
-UseCRLF: false
|
|
|
|
|
|
+UseCRLF: false
|
|
# 使用tab字符:ForIndentation——仅将制表符用于缩进
|
|
# 使用tab字符:ForIndentation——仅将制表符用于缩进
|
|
-UseTab: Never
|
|
|
|
|
|
+UseTab: Never
|
|
# 对空格敏感的宏定义
|
|
# 对空格敏感的宏定义
|
|
WhitespaceSensitiveMacros:
|
|
WhitespaceSensitiveMacros:
|
|
- STRINGIZE
|
|
- STRINGIZE
|
|
@@ -278,3 +334,5 @@ WhitespaceSensitiveMacros:
|
|
- BOOST_PP_STRINGIZE
|
|
- BOOST_PP_STRINGIZE
|
|
- NS_SWIFT_NAME
|
|
- NS_SWIFT_NAME
|
|
- CF_SWIFT_NAME
|
|
- CF_SWIFT_NAME
|
|
|
|
+---
|
|
|
|
+
|