BasedOnStyle: LLVM ColumnLimit: 100 IndentWidth: 4 IndentGotoLabels: false AlignArrayOfStructures: Left AlignConsecutiveAssignments: None AlignConsecutiveMacros: AcrossEmptyLines AlignConsecutiveDeclarations: Enabled: true # Available only with clang-format 20+ # AlignFunctionDeclarations: true AlignFunctionPointers: true # Ensure we either have all args/params on a single line, # or only one per line BinPackArguments: false BinPackParameters: false # To be changed for clang-format 20+ # BinPackParameters: OnePerLine # Avoid single-line enums/functions/ifs/loops/etc AllowShortBlocksOnASingleLine: Never AllowShortEnumsOnASingleLine: false AllowShortFunctionsOnASingleLine: None AllowShortCaseExpressionOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false AllowShortIfStatementsOnASingleLine: Never AllowShortLoopsOnASingleLine: false BreakBeforeBinaryOperators: None # Ensure function opening brackets are on their own line BreakBeforeBraces: Linux # Available only with clang-format 20+ # BreakBinaryOperations: OnePerLine InsertNewlineAtEOF: true # Don't be too strict on line lengths PenaltyExcessCharacter: 10 # Prefer breaking arguments list over putting a function call # on its own line after an assignment PenaltyBreakAssignment: 200 PenaltyBreakBeforeFirstCallParameter: 200 # Ensure we never ever have the return type on a single line PenaltyReturnTypeOnItsOwnLine: 1000