# reHDD Code Style - clang-format configuration # Based on analyzed codebase formatting BasedOnStyle: LLVM # Indentation IndentWidth: 4 TabWidth: 4 UseTab: Never ContinuationIndentWidth: 4 # Braces BreakBeforeBraces: Allman # Allman style: # if (condition) # { # statement; # } # Spacing SpaceAfterCStyleCast: false SpaceBeforeParens: ControlStatements SpaceInEmptyParentheses: false SpacesInContainerLiterals: false SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false # Alignment AlignAfterOpenBracket: Align AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: false AlignEscapedNewlines: Left AlignOperands: true AlignTrailingComments: false # Line breaks AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: None AllowShortIfStatementsOnASingleLine: Never AllowShortLoopsOnASingleLine: false AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: Yes # Column limit ColumnLimit: 0 # 0 = no limit (observed in the code) # Breaking BinPackArguments: true BinPackParameters: true BreakBeforeBinaryOperators: None BreakBeforeTernaryOperators: true BreakConstructorInitializers: BeforeColon BreakInheritanceList: BeforeColon BreakStringLiterals: false # Pointers and references PointerAlignment: Left # Type *variable (not Type* variable) # Include sorting SortIncludes: false # Keep includes in original order # Comments ReflowComments: false # Don't reformat comments # Access modifiers AccessModifierOffset: -4 # public: is outdented # Constructor initializers ConstructorInitializerIndentWidth: 6 # Observed 6 spaces for initializer lists # Other Cpp11BracedListStyle: true FixNamespaceComments: true IncludeBlocks: Preserve IndentCaseLabels: false IndentPPDirectives: None KeepEmptyLinesAtTheStartOfBlocks: false MaxEmptyLinesToKeep: 1 NamespaceIndentation: None PenaltyBreakBeforeFirstCallParameter: 100 PenaltyBreakComment: 300 PenaltyBreakString: 1000 PenaltyExcessCharacter: 1000000