clang-format.me

Editor
Raw
BasedOnStyle
  • AccessModifierOffset

    The extra indent or outdent of access modifiers, e.g. public:.

  • AlignAfterOpenBracket

  • AlignEscapedNewlinesLeft

    If true, aligns escaped newlines as far left as possible. Otherwise puts them into the right-most column.

  • AlignOperands

    If true, horizontally align operands of binary and ternary expressions.

  • AlignTrailingComments

    If true, aligns trailing comments.

  • AllowAllParametersOfDeclarationOnNextLine

    Allow putting all parameters of a function declaration onto the next line even if BinPackParameters is false.

  • AllowShortBlocksOnASingleLine

    Allows contracting simple braced statements to a single line.<br>E.g., this allows if (a) { return; } to be put on a single line.

  • AllowShortCaseLabelsOnASingleLine

    If true, short case labels will be contracted to a single line.

  • AllowShortFunctionsOnASingleLine

  • AllowShortIfStatementsOnASingleLine

    If true, if (a) return; can be put on a single line.

  • AllowShortLoopsOnASingleLine

    If true, while (true) continue; can be put on a single line.

  • AlwaysBreakAfterDefinitionReturnType

    If true, always break after function definition return types.<br>More truthfully called ‘break before the identifier following the type in a function definition’. PenaltyReturnTypeOnItsOwnLine becomes irrelevant.

  • AlwaysBreakBeforeMultilineStrings

    If true, always break before multiline string literals.

  • AlwaysBreakTemplateDeclarations

    If true, always break after the template<...> of a template declaration.

  • BinPackArguments

    If false, a function call’s arguments will either be all on the same line or will have one line each.

  • BinPackParameters

    If false, a function declaration’s or function definition’s parameters will either all be on the same line or will have one line each.

  • BreakBeforeBinaryOperators

  • BreakBeforeBraces

  • BreakBeforeTernaryOperators

    If true, ternary operators will be placed after line breaks.

  • BreakConstructorInitializersBeforeComma

    Always break constructor initializers before commas and align the commas with the colon.

  • ColumnLimit

  • CommentPragmas

    A regular expression that describes comments with special meaning, which should not be split into lines or otherwise changed.

  • ConstructorInitializerAllOnOneLineOrOnePerLine

    If the constructor initializers don’t fit on a line, put each initializer on its own line.

  • ConstructorInitializerIndentWidth

    The number of characters to use for indentation of constructor initializer lists.

  • ContinuationIndentWidth

    Indent width for line continuations.

  • Cpp11BracedListStyle

  • DerivePointerAlignment

    If true, analyze the formatted file for the most common alignment of & and *. PointerAlignment is then used only as fallback.

  • DisableFormat

    Disables formatting at all.

  • ExperimentalAutoDetectBinPacking

  • IndentCaseLabels

    Indent case labels one level from the switch statement.<br>When false, use the same indentation level as for the switch statement. Switch statement body is always indented one level more than case labels.

  • IndentWidth

    The number of columns to use for indentation.

  • IndentWrappedFunctionNames

    Indent if a function definition or declaration is wrapped after the type.

  • KeepEmptyLinesAtTheStartOfBlocks

    If true, empty lines at the start of blocks are kept.

  • Language

  • MaxEmptyLinesToKeep

    The maximum number of consecutive empty lines to keep.

  • NamespaceIndentation

  • ObjCBlockIndentWidth

    The number of characters to use for indentation of ObjC blocks.

  • ObjCSpaceAfterProperty

    Add a space after @property in Objective-C, i.e. use @property (readonly) instead of @property(readonly).

  • ObjCSpaceBeforeProtocolList

    Add a space in front of an Objective-C protocol list, i.e. use Foo <Protocol> instead of Foo<Protocol>.

  • PenaltyBreakBeforeFirstCallParameter

    The penalty for breaking a function call after “call(”.

  • PenaltyBreakComment

    The penalty for each line break introduced inside a comment.

  • PenaltyBreakFirstLessLess

    The penalty for breaking before the first <<.

  • PenaltyBreakString

    The penalty for each line break introduced inside a string literal.

  • PenaltyExcessCharacter

    The penalty for each character outside of the column limit.

  • PenaltyReturnTypeOnItsOwnLine

    Penalty for putting the return type of a function onto its own line.

  • PointerAlignment

  • SpaceAfterCStyleCast

    If true, a space may be inserted after C style casts.

  • SpaceBeforeAssignmentOperators

    If false, spaces will be removed before assignment operators.

  • SpaceBeforeParens

  • SpaceInEmptyParentheses

    If true, spaces may be inserted into ‘()’.

  • SpacesBeforeTrailingComments

    The number of spaces before trailing line comments (// - comments).<br>This does not affect trailing block comments (/**/ - comments) as those commonly have different usage patterns and a number of special cases.

  • SpacesInAngles

    If true, spaces will be inserted after ‘<’ and before ‘>’ in template argument lists

  • SpacesInCStyleCastParentheses

    If true, spaces may be inserted into C style casts.

  • SpacesInContainerLiterals

    If true, spaces are inserted inside container literals (e.g. ObjC and Javascript array and dict literals).

  • SpacesInParentheses

    If true, spaces will be inserted after ‘(‘ and before ‘)’.

  • SpacesInSquareBrackets

    If true, spaces will be inserted after ‘[‘ and before ‘]’.

  • Standard

  • TabWidth

    The number of columns used for tab stops.

  • UseTab