--- # --------------------------- # general style settings # --------------------------- BasedOnStyle: GNU Standard: Auto ColumnLimit: 0 LineEnding: LF UseTab: ForContinuationAndIndentation TabWidth: 8 IndentWidth: 8 ContinuationIndentWidth: 8 AccessModifierOffset: -4 # --------------------------- # alignment options # --------------------------- AlignAfterOpenBracket: DontAlign AlignOperands: DontAlign AlignTrailingComments: true AlignEscapedNewlines: Right AlignArrayOfStructures: None AlignConsecutiveBitFields: AcrossEmptyLines AlignConsecutiveDeclarations: None AlignConsecutiveMacros: AcrossEmptyLines AlignConsecutiveShortCaseStatements: Enabled: true # --------------------------- # short constructs on a single line # --------------------------- AllowShortBlocksOnASingleLine: Empty AllowShortFunctionsOnASingleLine: All AllowShortLambdasOnASingleLine: All AllowShortIfStatementsOnASingleLine: AllIfsAndElse AllowShortCaseLabelsOnASingleLine: true AllowShortEnumsOnASingleLine: true AllowShortLoopsOnASingleLine: true # --------------------------- # break and wrapping options # --------------------------- AlwaysBreakAfterReturnType: Automatic AlwaysBreakBeforeMultilineStrings: false BreakTemplateDeclarations: false BreakBeforeBinaryOperators: None BreakBeforeBraces: Custom BreakBeforeTernaryOperators: false BreakStringLiterals: false BreakConstructorInitializers: BeforeComma BreakBeforeConceptDeclarations: Never # --------------------------- # brace wrapping configuration # --------------------------- BraceWrapping: AfterClass: false AfterControlStatement: Never AfterEnum: false AfterFunction: false AfterNamespace: false AfterStruct: false AfterUnion: false BeforeElse: false BeforeCatch: false SplitEmptyFunction: true SplitEmptyRecord: true SplitEmptyNamespace: true AfterCaseLabel: false AfterObjCDeclaration: false AfterExternBlock: false BeforeLambdaBody: false BeforeWhile: false IndentBraces: false # --------------------------- # constructor initializer and parameter packing options # --------------------------- ConstructorInitializerIndentWidth: 8 PackConstructorInitializers: NextLine BinPackParameters: true BinPackArguments: true # --------------------------- # pointer alignment # --------------------------- DerivePointerAlignment: false PointerAlignment: Right ReferenceAlignment: Pointer QualifierAlignment: Left # --------------------------- # include settings and sorting # --------------------------- IncludeIsMainSourceRegex: '' IncludeIsMainRegex: '([-_](test|unittest))?$' IncludeBlocks: Regroup IncludeCategories: - Regex: '^<.*\.h>' Priority: 2 SortPriority: 0 CaseSensitive: true - Regex: '^".*' Priority: 3 SortPriority: 0 CaseSensitive: true # --------------------------- # additional formatting and sorting details # --------------------------- FixNamespaceComments: false MaxEmptyLinesToKeep: 2 ReflowComments: false SortIncludes: Never SortUsingDeclarations: false IndentCaseLabels: false IndentGotoLabels: false AllowAllArgumentsOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false EmptyLineAfterAccessModifier: Never EmptyLineBeforeAccessModifier: LogicalBlock ExperimentalAutoDetectBinPacking: false SeparateDefinitionBlocks: Leave ShortNamespaceLines: 1 SortJavaStaticImport: Before # --------------------------- # spacing options # --------------------------- SpaceAfterCStyleCast: false SpaceAfterTemplateKeyword: true SpaceBeforeAssignmentOperators: true SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements SpacesInParens: Custom SpacesInParensOptions: ExceptDoubleParentheses: false InConditionalStatements: false InCStyleCasts: false Other: false SpaceBeforeRangeBasedForLoopColon: true SpacesInAngles: Never SpacesInContainerLiterals: false SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false SpacesBeforeTrailingComments: 1 SpaceAfterLogicalNot: false SpaceBeforeCaseColon: false Cpp11BracedListStyle: true SpaceBeforeCpp11BracedList: false SpaceInEmptyBlock: true SpacesInLineCommentPrefix: Minimum: 1 Maximum: 1 SpaceBeforeSquareBrackets: false BitFieldColonSpacing: Both # --------------------------- # penalty settings # --------------------------- PenaltyBreakAssignment: 10 PenaltyBreakBeforeFirstCallParameter: 30 PenaltyBreakComment: 10 PenaltyBreakFirstLessLess: 0 PenaltyBreakString: 10 PenaltyExcessCharacter: 100 PenaltyReturnTypeOnItsOwnLine: 60 # --------------------------- # indentation details # --------------------------- IndentAccessModifiers: false IndentCaseBlocks: false IndentExternBlock: AfterExternBlock IndentRequiresClause: false IndentPPDirectives: None PPIndentWidth: 1 ...