2023年11月29日
[C++] .clang-format
格式化不按照自己心意来太难受了,保存以备用
Language: CppBasedOnStyle: GoogleAccessModifierOffset: -4AlignAfterOpenBracket: AlignAlignConsecutiveAssignments: trueAlignOperands: trueAllowAllArgumentsOnNextLine: trueAllowAllConstructorInitializersOnNextLine: trueAllowAllParametersOfDeclarationOnNextLine: falseAllowShortBlocksOnASingleLine: EmptyAllowShortCaseLabelsOnASingleLine: falseAllowShortFunctionsOnASingleLine: InlineAllowShortIfStatementsOnASingleLine: Never # To avoid conflict, set this "Never" and each "if statement" should include brace when codingAllowShortLambdasOnASingleLine: InlineAllowShortLoopsOnASingleLine: falseAlwaysBreakAfterReturnType: NoneAlwaysBreakTemplateDeclarations: YesBinPackArguments: trueBreakBeforeBraces: CustomBraceWrapping: AfterCaseLabel: false AfterClass: false AfterStruct: false AfterControlStatement: Never AfterEnum: false AfterFunction: false AfterNamespace: false AfterUnion: false AfterExternBlock: false BeforeCatch: false BeforeElse: false IndentBraces: false SplitEmptyFunction: false SplitEmptyRecord: false SplitEmptyNamespace: falseBreakBeforeBinaryOperators: NoneBreakBeforeTernaryOperators: trueBreakConstructorInitializers: BeforeColonBreakInheritanceList: BeforeColonColumnLimit: 100CompactNamespaces: falseContinuationIndentWidth: 4Cpp11BracedListStyle: trueDerivePointerAlignment: false # Make sure the * or & align on the leftFixNamespaceComments: trueIncludeBlocks: PreserveIndentCaseLabels: trueIndentPPDirectives: NoneIndentWidth: 4KeepEmptyLinesAtTheStartOfBlocks: trueMaxEmptyLinesToKeep: 1NamespaceIndentation: NoneObjCSpaceAfterProperty: falseObjCSpaceBeforeProtocolList: truePointerAlignment: LeftReflowComments: false# SeparateDefinitionBlocks: Always # Only support since clang-format 14SpaceAfterCStyleCast: falseSpaceAfterLogicalNot: falseSpaceAfterTemplateKeyword: trueSpaceBeforeAssignmentOperators: trueSpaceBeforeCpp11BracedList: falseSpaceBeforeCtorInitializerColon: trueSpaceBeforeInheritanceColon: trueSpaceBeforeParens: ControlStatementsSpaceBeforeRangeBasedForLoopColon: trueSpaceBeforeSquareBrackets: falseSpaceInEmptyParentheses: falseSpacesBeforeTrailingComments: 2SpacesInAngles: falseSpacesInCStyleCastParentheses: falseSpacesInContainerLiterals: falseSpacesInParentheses: falseSpacesInSquareBrackets: falseStandard: c++11TabWidth: 4UseTab: Never