--- # 语言: None, Cpp, Java, JavaScript, ObjC, Proto, TableGen, TextProto Language: Cpp # BasedOnStyle: LLVM # 访问说明符(public、private等)的偏移 AccessModifierOffset: -4 # 开括号(开圆括号、开尖括号、开方括号)后的对齐: Align, DontAlign, AlwaysBreak(总是在开括号后换行) AlignAfterOpenBracket: Align # 对齐数组列 AlignArrayOfStructures: None # 对齐连续宏定义 AlignConsecutiveMacros: true #AcrossEmptyLinesAndComments # 连续赋值时,对齐所有等号 AlignConsecutiveAssignments: true # 对齐连续位字段 AlignConsecutiveBitFields: true # 连续声明时,对齐所有声明的变量名 AlignConsecutiveDeclarations: true # 左对齐逃脱换行(使用反斜杠换行)的反斜杠 AlignEscapedNewlines: Right # 水平对齐二元和三元表达式的操作数 AllowAllArgumentsOnNextLine: true AllowAllConstructorInitializersOnNextLine: true AlwaysBreakAfterDefinitionReturnType: None AlignOperands: true #Align # 对齐连续的尾随的注释 AlignTrailingComments: true # 允许函数声明的所有参数在放在下一行 AllowAllParametersOfDeclarationOnNextLine: true # 允许短的枚举放在同一行 AllowShortEnumsOnASingleLine: true # 允许短的块放在同一行 AllowShortBlocksOnASingleLine: Never # 允许短的case标签放在同一行 AllowShortCaseLabelsOnASingleLine: false # 允许短的函数放在同一行 AllowShortFunctionsOnASingleLine: false #All # 允许短的匿名函数放在同一行 AllowShortLambdasOnASingleLine: All # 允许短的if语句保持在同一行 AllowShortIfStatementsOnASingleLine: Never # 允许短的循环保持在同一行 AllowShortLoopsOnASingleLine: false # 总是在返回类型后换行 AlwaysBreakAfterReturnType: None # 总是在多行string字面量前换行 AlwaysBreakBeforeMultilineStrings: false # 总是在template声明后换行 AlwaysBreakTemplateDeclarations: MultiLine AttributeMacros: - __capability # false表示函数实参要么都在同一行,要么都各自一行 BinPackArguments: true # false表示所有形参要么都在同一行,要么都各自一行 BinPackParameters: true # 是否允许短方法单行,只有一行的函数将不会分行,直接写在函数名后 # 括号是分行,还是不分行,只有当 BreakBeforeBraces 设置为 Custom 时才有效 BraceWrapping: AfterCaseLabel: true # class 定义后面 AfterClass: true # 控制语句后面 AfterControlStatement: true AfterEnum: true AfterFunction: true AfterNamespace: true AfterObjCDeclaration: true AfterStruct: true AfterUnion: true AfterExternBlock: false BeforeCatch: true BeforeElse: true # 缩进大括号 IndentBraces: false SplitEmptyFunction: true SplitEmptyRecord: true SplitEmptyNamespace: true BreakBeforeBinaryOperators: None BreakBeforeBraces: Custom BreakBeforeInheritanceComma: false BreakInheritanceList: BeforeColon BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: false BreakConstructorInitializers: BeforeColon BreakAfterJavaFieldAnnotations: false BreakStringLiterals: true ColumnLimit: 100 CommentPragmas: "^ IWYU pragma:" CompactNamespaces: false ConstructorInitializerAllOnOneLineOrOnePerLine: false ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 Cpp11BracedListStyle: true DeriveLineEnding: true DerivePointerAlignment: false DisableFormat: false ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true ForEachMacros: - foreach - Q_FOREACH - BOOST_FOREACH IncludeBlocks: Preserve IncludeCategories: - 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: "" IndentCaseLabels: false IndentGotoLabels: true IndentPPDirectives: None # 换行缩进字符数 IndentWidth: 4 IndentWrappedFunctionNames: false JavaScriptQuotes: Leave JavaScriptWrapImports: true KeepEmptyLinesAtTheStartOfBlocks: true MacroBlockBegin: "" MacroBlockEnd: "" MaxEmptyLinesToKeep: 1 NamespaceIndentation: None ObjCBinPackProtocolList: Auto ObjCBlockIndentWidth: 0 ObjCSpaceAfterProperty: false ObjCSpaceBeforeProtocolList: true PenaltyBreakAssignment: 2 PenaltyBreakBeforeFirstCallParameter: 19 PenaltyBreakComment: 300 PenaltyBreakFirstLessLess: 120 PenaltyBreakString: 1000 PenaltyBreakTemplateDeclaration: 10 PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 60 PointerAlignment: Right ReflowComments: true SortIncludes: true SortUsingDeclarations: true SpaceAfterCStyleCast: false SpaceAfterLogicalNot: false SpaceAfterTemplateKeyword: true SpaceBeforeAssignmentOperators: true SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements SpaceBeforeRangeBasedForLoopColon: true SpaceInEmptyBlock: false SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 SpacesInAngles: false SpacesInConditionalStatement: false SpacesInContainerLiterals: true SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false # 不在[前添加空格 SpaceBeforeSquareBrackets: false # 位域:每边都添加空格 BitFieldColonSpacing: Both # 标准 Standard: Latest # 在语句前面被忽略的宏定义,就好像它们是一个属性一样 StatementAttributeLikeMacros: - Q_EMIT # 应该被解释为完整语句的宏定义 StatementMacros: - Q_UNUSED - QT_REQUIRE_VERSION # tab宽度 TabWidth: 4 # 使用\n换行 UseCRLF: false # 使用tab字符:ForIndentation——仅将制表符用于缩进 UseTab: Never # 对空格敏感的宏定义 WhitespaceSensitiveMacros: - STRINGIZE - PP_STRINGIZE - BOOST_PP_STRINGIZE - NS_SWIFT_NAME - CF_SWIFT_NAME ---