Formatter Validator Minifier Escape / Unescape JSON ↔ String JSON ↔ YAML JSON → CSV NDJSON / JSON Lines JSON → Types JSON ↔ XML JSON Diff JSON Patch Canonicalize (RFC 8785) Schema Validator Schema Generator JSONPath Tester JWT Decoder JSON Errors Schemas More Tools
JSONTools / Schema registry / clang-format (.clang-format)
Schema registry

clang-format (.clang-format)

yaml clang-format config

.clang-format

Check your file against this schema

Opens the validator with this schema already loaded. Paste your .clang-format and it validates in your browser — nothing is uploaded.

Validate a .clang-format → View raw schema

Fields

Generated directly from the schema, following local $refs, to two levels of nesting.

Field Type Description
BasedOnStylestringThe style used for all options not specifically set in the configuration.
one of: "Chromium", "Google", "LLVM", "Mozilla", "WebKit", "Microsoft" … (+10)
AccessModifierOffsetintegerclang-format 3.3 The extra indent or outdent of access modifiers, e.g. public:.
AlignAfterOpenBracketstringclang-format 3.8 This applies to round brackets (parentheses), angle brackets and square brackets.
one of: "Align", "DontAlign", "AlwaysBreak", "BlockIndent"
AlignArrayOfStructuresstringclang-format 13 If not None, when using initialization for an array of structs aligns the fields into columns. NOTE: As of clang-format 15 this option only applied to arrays with equal number of columns per row.
one of: "None", "Left", "Right"
AlignConsecutiveMacrosoneOf
AlignConsecutiveAssignmentsoneOf
AlignConsecutiveBitFieldsoneOf
AlignConsecutiveDeclarationsoneOf
AlignConsecutiveShortCaseStatementsobjectclang-format 17 Style of aligning consecutive short case labels.
AlignConsecutiveShortCaseStatements.EnabledbooleanWhether aligning is enabled.
AlignConsecutiveShortCaseStatements.AcrossEmptyLinesbooleanWhether to align across empty lines.
AlignConsecutiveShortCaseStatements.AcrossCommentsbooleanWhether to align across comments.
AlignConsecutiveShortCaseStatements.AlignCaseColonsbooleanWhether aligned case labels are aligned on the colon or on the tokens after the colon.
AlignConsecutiveShortCaseStatements.AlignCaseArrowsbooleanWhether to align the case arrows when aligning short case expressions.
AlignEscapedNewlinesstringclang-format 5 Options for aligning backslashes in escaped newlines.
one of: "Left", "Right", "DontAlign", "LeftWithLastLine"
AlignOperandsstringclang-format 3.5 If true, horizontally align operands of binary and ternary expressions.
one of: "Align", "DontAlign", "AlignAfterOperato…
AlignTrailingCommentsoneOfControl of trailing comments.
AllowAllArgumentsOnNextLinebooleanclang-format 9 If a function call or braced initializer list doesn't fit on a line, allow putting all arguments onto the next line, even if BinPackArguments is false.
AllowAllConstructorInitializersOnNextLinebooleanclang-format 9 This option is deprecated in clang-format 15. See NextLine of PackConstructorInitializers. If a constructor definition with a member initializer list doesn't fit on a single line, allow putting all member initializers onto
AllowAllParametersOfDeclarationOnNextLinebooleanclang-format 3.3 If the function declaration doesn't fit on a line, allow putting all parameters of a function declaration onto the next line even if BinPackParameters is false.
AllowBreakBeforeNoexceptSpecifierstringclang-format 18 Controls if there could be a line break before a noexcept specifier.
one of: "Never", "OnlyWithParen", "Always"
AllowShortEnumsOnASingleLinebooleanclang-format 11 Allow short enums on a single line.
AllowShortBlocksOnASingleLinestringclang-format 3.5 Dependent on the value, while (true) { continue; } can be put on a single line.
one of: "Never", "Empty", "Always"
AllowShortCaseLabelsOnASingleLinebooleanclang-format 3.6 If true, short case labels will be contracted to a single line.
AllowShortCompoundRequirementOnASingleLinebooleanclang-format 18 Allow short compound requirement on a single line.
AllowShortFunctionsOnASingleLinestringclang-format 3.5 Dependent on the value, int f() { return 0; } can be put on a single line.
one of: "All", "None", "Inline", "Empty", "InlineOnly"
AllowShortLambdasOnASingleLinestringclang-format 9 Dependent on the value, auto lambda []() { return 0; } can be put on a single line.
one of: "None", "Empty", "Inline", "All"
AllowShortIfStatementsOnASingleLinestringclang-format 3.3 Dependent on the value, if (a) return; can be put on a single line.
one of: "AllIfsAndElse", "Never", "WithoutElse", "OnlyFirstIf"
AllowShortLoopsOnASingleLinebooleanclang-format 3.7 If true, while (true) continue; can be put on a single line.
AlwaysBreakAfterDefinitionReturnTypestringclang-format 3.7 This option is deprecated and is retained for backwards compatibility. The function definition return type breaking style to use. This option is deprecated and is retained for backwards compatibility
one of: "None", "All", "TopLevel"
AlwaysBreakAfterReturnTypestringclang-format 19 The function declaration return type breaking style to use.
one of: "Automatic", "ExceptShortType", "None", "All", "TopLevel", "AllDefinitions" … (+1)
AlwaysBreakBeforeMultilineStringsbooleanclang-format 3.4 If true, always break before multiline string literals.
AlwaysBreakTemplateDeclarationsstringclang-format 19 The template declaration breaking style to use.
one of: "Leave", "No", "MultiLine", "Yes"
AttributeMacrosarray<string>clang-format 12 A vector of strings that should be interpreted as attributes/qualifiers instead of identifiers. This can be useful for language extensions or static analyzer annotations.
BinPackArgumentsbooleanclang-format 3.7 If false, a function call's arguments will either be all on the same line or will have one line each.
BinPackParametersstringclang-format 3.7 The bin pack parameters style to use.
one of: "BinPack", "OnePerLine", "AlwaysOnePerLine"
BitFieldColonSpacingstringclang-format 12 The BitFieldColonSpacingStyle to use for bitfields.
one of: "Both", "None", "Before", "After"
BraceWrappingobjectclang-format 3.8 Control of individual brace wrapping cases. If BreakBeforeBraces is set to Custom, use this to specify how each individual brace case should be handled. Otherwise, this is ignored.
BraceWrapping.AfterCaseLabelbooleanWrap case labels.
BraceWrapping.AfterClassbooleanWrap class definitions.
BraceWrapping.AfterControlStatementstringWrap control statements (if/for/while/switch/...).
one of: "Never", "MultiLine", "Always"
BraceWrapping.AfterEnumbooleanWrap enum definitions.
BraceWrapping.AfterFunctionbooleanWrap function definitions.
BraceWrapping.AfterNamespacebooleanWrap namespace definitions.
BraceWrapping.AfterObjCDeclarationbooleanWrap ObjC definitions (interfaces, implementations…). @autoreleasepool and @synchronized blocks are wrapped according to AfterControlStatement flag.
BraceWrapping.AfterStructbooleanWrap struct definitions.
BraceWrapping.AfterUnionbooleanWrap union definitions.
BraceWrapping.AfterExternBlockbooleanWrap extern blocks.
BraceWrapping.BeforeCatchbooleanWrap before catch.
BraceWrapping.BeforeElsebooleanWrap before else.
BraceWrapping.BeforeLambdaBodybooleanWrap lambda block.
BraceWrapping.BeforeWhilebooleanWrap before while.
BraceWrapping.IndentBracesbooleanIndent the wrapped braces themselves.
BraceWrapping.SplitEmptyFunctionbooleanIf false, empty function body can be put on a single line. This option is used only if the opening brace of the function has already been wrapped, i.e. the AfterFunction brace wrapping mode is set, and the function could/should not be put
BraceWrapping.SplitEmptyRecordbooleanIf false, empty record (e.g. class, struct or union) body can be put on a single line. This option is used only if the opening brace of the record has already been wrapped, i.e. the AfterClass (for classes) brace wrapping mode is set.
BraceWrapping.SplitEmptyNamespacebooleanIf false, empty namespace body can be put on a single line. This option is used only if the opening brace of the namespace has already been wrapped, i.e. the AfterNamespace brace wrapping mode is set.
BracedInitializerIndentWidthintegerclang-format 17 The number of columns to use to indent the contents of braced init lists. If unset or negative, ContinuationIndentWidth is used.
BreakAdjacentStringLiteralsbooleanclang-format 18 Break between adjacent string literals.
BreakAfterAttributesstringclang-format 16 Break after a group of C++11 attributes before a function declaration/definition name.
one of: "Always", "Leave", "Never"
BreakAfterJavaFieldAnnotationsbooleanclang-format 3.8 Break after each annotation on a field in Java files.
BreakArraysbooleanclang-format 16 If true, clang-format will always break after a Json array [ otherwise it will scan until the closing ] to determine if it should add newlines between elements (prettier compatible).
BreakBeforeInlineASMColonstringclang-format 16 The inline ASM colon style to use..
one of: "Never", "OnlyMultiline", "Always"
BreakBeforeBinaryOperatorsstringclang-format 3.6 The way to wrap binary operators.
one of: "None", "NonAssignment", "All"
BreakBeforeBracesstringclang-format 3.7 The brace breaking style to use.
one of: "Attach", "Linux", "Mozilla", "Stroustrup", "Allman", "Whitesmiths" … (+3)
BreakBeforeConceptDeclarationsstringclang-format 12 The concept declaration style to use.
one of: "Never", "Allowed", "Always"
BreakBeforeTernaryOperatorsbooleanclang-format 3.7 If true, ternary operators will be placed after line breaks.
BreakConstructorInitializersstringclang-format 5 The constructor initializers style to use.
one of: "BeforeColon", "BeforeComma", "AfterColon"
BreakInheritanceListstringclang-format 7 The inheritance list style to use.
one of: "BeforeColon", "BeforeComma", "AfterColon", "AfterComma"
BreakStringLiteralsbooleanclang-format 3.9 Allow breaking string literals when formatting.
ColumnLimitintegerclang-format 3.7 The column limit.
CommentPragmasstringclang-format 3.7 A regular expression that describes comments with special meaning, which should not be split into lines or otherwise changed.
CompactNamespacesbooleanclang-format 5 If true, consecutive namespace declarations will be on the same line. If false, each namespace is declared on a new line.
ConstructorInitializerAllOnOneLineOrOnePerLinebooleanclang-format 3.7 This option is deprecated. See CurrentLine of PackConstructorInitializers.
ConstructorInitializerIndentWidthintegerclang-format 3.7 The number of characters to use for indentation of constructor initializer lists as well as inheritance lists.
ContinuationIndentWidthintegerclang-format 3.7 Indent width for line continuations.
Cpp11BracedListStylebooleanclang-format 3.4 If true, format braced lists as best suited for C++11 braced lists.
DeriveLineEndingbooleanclang-format 10 Deprecated. See DeriveLF and DeriveCRLF of LineEnding.
DerivePointerAlignmentbooleanclang-format 3.7 If true, analyze the formatted file for the most common alignment of & and *. Pointer and reference alignment styles are going to be updated according to the preferences found in the file. PointerAlignment is then used
DisableFormatbooleanclang-format 3.7 Disables formatting completely.
EmptyLineAfterAccessModifierstringclang-format 13 Defines when to put an empty line after access modifiers. EmptyLineBeforeAccessModifier configuration handles the number of empty lines between two access modifiers.
one of: "Never", "Leave", "Always"
EmptyLineBeforeAccessModifierstringclang-format 12 Defines in which cases to put empty line before access modifiers.
one of: "LogicalBlock", "Never", "Leave", "Always"
ExperimentalAutoDetectBinPackingbooleanclang-format 3.7 If true, clang-format detects whether function calls and definitions are formatted with one parameter per line.
FixNamespaceCommentsbooleanclang-format 5 If true, clang-format adds missing namespace end comments for namespaces and fixes invalid existing ones. This doesn't affect short namespaces, which are controlled by ShortNamespaceLines.
ForEachMacrosarray<string>clang-format 3.7 A vector of macros that should be interpreted as foreach loops instead of as function calls.
IfMacrosarray<string>clang-format 13 A vector of macros that should be interpreted as conditionals instead of as function calls.
IncludeBlocksstringclang-format 6 Dependent on the value, multiple #include blocks can be sorted as one and divided based on category.
one of: "Regroup", "Preserve", "Merge"
IncludeCategoriesarray<object>clang-format 3.8 Regular expressions denoting the different #include categories used for ordering #includes. POSIX extended regular expressions are supported. These regular expressions are matched against the filename of an include
IncludeIsMainRegexstringclang-format 3.9 Specify a regular expression of suffixes that are allowed in the file-to-main-include mapping. When guessing whether a #include is the "main" include (to assign category 0, see above), use this regex of allowed suffixes to
IncludeIsMainSourceRegexstringclang-format 10 Specify a regular expression for files being formatted that are allowed to be considered "main" in the file-to-main-include mapping. By default, clang-format considers files as "main" only when they end with: .c, .cc, .cpp
IndentAccessModifiersbooleanclang-format 13 Specify whether access modifiers should have their own indentation level. When false, access modifiers are indented (or outdented) relative to the record members, respecting the AccessModifierOffset. Record members are
IndentCaseBlocksbooleanclang-format 11 Indent case label blocks one level from the case label. When false, the block following the case label uses the same indentation level as for the case label, treating the case label the same as an if-statement. When true
IndentCaseLabelsbooleanclang-format 3.3 Indent case labels one level from the switch statement. When false, use the same indentation level as for the switch statement. Switch statement body is always indented one level more than case labels (except the first
IndentExternBlockstringclang-format 11 IndentExternBlockStyle is the type of indenting of extern blocks.
one of: "AfterExternBlock", "NoIndent", "Indent"
IndentGotoLabelsbooleanclang-format 10 Indent goto labels. When false, goto labels are flushed left.
IndentPPDirectivesstringclang-format 6 The preprocessor directive indenting style to use.
one of: "None", "AfterHash", "BeforeHash"
IndentRequiresClausebooleanclang-format 15 Indent the requires clause in a template. This only applies when RequiresClausePosition is OwnLine, or WithFollowing.
IndentRequiresbooleanclang-format 12-14 Indent the requires clause in a template. This only applies when RequiresClausePosition is OwnLine, or WithFollowing. In clang-format 12, 13 and 14 it was named IndentRequires.
IndentWidthintegerclang-format 3.7 The number of columns to use for indentation.
IndentWrappedFunctionNamesbooleanclang-format 3.7 Indent if a function definition or declaration is wrapped after the type.
InsertBracesbooleanclang-format 15 Insert braces after control statements (if, else, for, do, and while) in C++ unless the control statements are inside macro definitions or the braces would enclose preprocessor directives. Warning: Setting this option to
InsertNewlineAtEOFbooleanclang-format 16 Insert a newline at end of file if missing.
InsertTrailingCommasstringclang-format 11 If set to TCS_Wrapped will insert trailing commas in container literals (arrays and objects) that wrap across multiple lines. It is currently only available for JavaScript and disabled by default TCS_None
one of: "None", "Wrapped"
IntegerLiteralSeparatorobjectclang-format 16 Format integer literal separators (' for C++ and _ for C#, Java, and JavaScript). Separator format of integer literals of different bases. If negative, remove separators. If 0, leave the literal as is. If positive, insert
IntegerLiteralSeparator.BinaryintegerFormat separators in binary literals.
IntegerLiteralSeparator.BinaryMinDigitsintegerFormat separators in binary literals with a minimum number of digits.
IntegerLiteralSeparator.DecimalintegerFormat separators in decimal literals.
IntegerLiteralSeparator.DecimalMinDigitsintegerFormat separators in decimal literals with a minimum number of digits.
IntegerLiteralSeparator.HexintegerFormat separators in hexadecimal literals
IntegerLiteralSeparator.HexMinDigitsintegerFormat separators in hexadecimal literals with a minimum number of digits.
JavaScriptQuotesstringclang-format 3.9 The JavaScriptQuoteStyle to use for JavaScript strings.
one of: "Leave", "Single", "Double"
JavaScriptWrapImportsbooleanclang-format 3.9 Whether to wrap JavaScript import/export statements.
KeepEmptyLinesAtEOFbooleanclang-format 17 This option is deprecated. See AtEndOfFile of KeepEmptyLines.
KeepEmptyLinesAtTheStartOfBlocksbooleanclang-format 3.7 This option is deprecated. See AtStartOfBlock of KeepEmptyLines.
LambdaBodyIndentationstringclang-format 13 The indentation style of lambda bodies. Signature (the default) causes the lambda body to be indented one additional level relative to the indentation level of the signature. OuterScope forces the lambda body to be indented
one of: "Signature", "OuterScope"
Languagestringclang-format 3.5 Language, this format style is targeted at.
one of: "None", "C", "Cpp", "CSharp", "Java", "JavaScript" … (+6)
LineEndingstringclang-format 16 Line ending style (\n or \r\n) to use.
one of: "LF", "CRLF", "DeriveLF", "DeriveCRLF"
MacroBlockBeginstringclang-format 3.7 A regular expression matching macros that start a block.
MacroBlockEndstringclang-format 3.7 A regular expression matching macros that end a block.
Macrosarray<string>clang-format 17 A list of macros of the form <definition>=<expansion>. Code will be parsed with macros expanded, in order to determine how to interpret and format the macro arguments.
MaxEmptyLinesToKeepintegerclang-format 3.7 The maximum number of consecutive empty lines to keep.
default: 1
NamespaceIndentationstringclang-format 3.7 The indentation used for namespaces.
one of: "None", "Inner", "All"
NamespaceMacrosarray<string>clang-format 9 A vector of macros which are used to open namespace blocks.
ObjCBinPackProtocolListstringclang-format 7 Controls bin-packing Objective-C protocol conformance list items into as few lines as possible when they go over ColumnLimit.If Auto (the default), delegates to the value in BinPackParameters. If that is true, bin-packs
default: "Auto"
one of: "Never", "Auto", "Always"
ObjCBlockIndentWidthintegerclang-format 3.7 The number of characters to use for indentation of ObjC blocks.
ObjCBreakBeforeNestedBlockParambooleanclang-format 11 Break parameters list into lines when there is nested block parameters in a function call.
ObjCPropertyAttributeOrderarray<string>clang-format 18 The order in which ObjC property attributes should appear. Attributes in code will be sorted in the order specified. Any attributes encountered that are not mentioned in this array will be sorted last, in stable order
ObjCSpaceAfterPropertybooleanclang-format 3.7 Add a space after @property in Objective-C, i.e. use @property (readonly) instead of @property(readonly).
ObjCSpaceBeforeProtocolListbooleanclang-format 3.7 Add a space in front of an Objective-C protocol list, i.e. use Foo <Protocol> instead of Foo<Protocol>.
PPIndentWidthintegerclang-format 13 The number of columns to use for indentation of preprocessor statements. When set to -1 (default) IndentWidth is used also for preprocessor statements.
default: -1
PackConstructorInitializersstringclang-format 14 The pack constructor initializers style to use.
one of: "Never", "BinPack", "CurrentLine", "NextLine", "NextLineOnly"
PenaltyBreakAssignmentintegerclang-format 5 The penalty for breaking around an assignment operator.
PenaltyBreakBeforeFirstCallParameterintegerclang-format 3.7 The penalty for breaking a function call after call(.
PenaltyBreakCommentintegerclang-format 3.7 The penalty for each line break introduced inside a comment.
PenaltyBreakFirstLessLessintegerclang-format 3.7 The penalty for breaking before the first <<.
PenaltyBreakOpenParenthesisintegerclang-format 14 The penalty for breaking after (.
PenaltyBreakScopeResolutionintegerclang-format 18 The penalty for breaking after ::.
PenaltyBreakStringintegerclang-format 3.7 The penalty for each line break introduced inside a string literal.
PenaltyBreakTemplateDeclarationintegerclang-format 7 The penalty for breaking after template declaration.
PenaltyExcessCharacterintegerclang-format 3.7 The penalty for each character outside of the column limit.
PenaltyIndentedWhitespaceintegerclang-format 12 Penalty for each character of whitespace indentation (counted relative to leading non-whitespace column).
PenaltyReturnTypeOnItsOwnLineintegerclang-format 3.7 Penalty for putting the return type of a function onto its own line.
PointerAlignmentstringclang-format 3.7 Pointer and reference alignment style.
one of: "Left", "Right", "Middle"
QualifierAlignmentstringclang-format 14 Different ways to arrange specifiers and qualifiers (e.g. const/volatile). Warning: Setting QualifierAlignment to something other than Leave, COULD lead to incorrect code formatting due to incorrect decisions made due to
one of: "Leave", "Left", "Right", "Custom"
QualifierOrderarray<string>clang-format 14 The order in which the qualifiers appear. Order is an array that can contain any of the following. Note: it MUST contain 'type'. Items to the left of 'type' will be placed to the left of the type and aligned in the order
RawStringFormatsarray<object>clang-format 6 Defines hints for detecting supported languages code blocks in raw strings.
ReferenceAlignmentstringclang-format 13 Reference alignment style (overrides PointerAlignment for references).
one of: "Pointer", "Left", "Right", "Middle"
ReflowCommentsstringclang-format 3.8 Comment reformatting style.
one of: "Never", "IndentOnly", "Always"
RemoveSemicolonbooleanclang-format 16 Remove semicolons after the closing brace of a non-empty function. Warning: Setting this option to true could lead to incorrect code formatting due to clang-format's lack of complete semantic information. As such, extra
RemoveBracesLLVMbooleanclang-format 14 Remove optional braces of control statements (if, else, for, and while) in C++ according to the LLVM coding style. Warning: This option will be renamed and expanded to support other styles. Setting this option to true could
RemoveParenthesesstringclang-format 17 Remove redundant parentheses. Warning: Setting this option to any value other than Leave could lead to incorrect code formatting due to clang-format’s lack of complete semantic information. As such, extra care should be
one of: "Leave", "MultipleParenthes…, "ReturnStatement"
RequiresClausePositionstringclang-format 15 The position of the requires clause.
one of: "OwnLine", "OwnLineWithBrace", "WithPreceding", "WithFollowing", "SingleLine"
RequiresExpressionIndentationstringclang-format 16 The indentation used for requires expression bodies.
one of: "OuterScope", "Keyword"
SeparateDefinitionBlocksstringclang-format 14 Specifies the use of empty lines to separate definition blocks, including classes, structs, enums, and functions.
one of: "Leave", "Always", "Never"
ShortNamespaceLinesintegerclang-format 13 The maximal number of unwrapped lines that a short namespace spans. Defaults to 1.
default: 1
SkipMacroDefinitionBodybooleanclang-format 18 Do not format macro definition body.
SortIncludesobjectclang-format 3.8 Controls if and how clang-format will sort #includes.
SortIncludes.EnabledbooleanIf true, includes are sorted based on the other suboptions.
SortIncludes.IgnoreCasebooleanWhether or not includes are sorted in a case-insensitive fashion.
SortJavaStaticImportstringclang-format 12 When sorting Java imports, by default static imports are placed before non-static imports. If JavaStaticImportAfterImport is After, static imports are placed after non-static imports.
one of: "Before", "After"
SortUsingDeclarationsstringclang-format 5 Controls if and how clang-format will sort using declarations.
one of: "Never", "Lexicographic", "LexicographicNume…
SpaceAfterCStyleCastbooleanclang-format 3.5 If true, a space is inserted after C style casts.
SpaceAfterLogicalNotbooleanclang-format 9 If true, a space is inserted after the logical not operator (!).
SpaceAfterTemplateKeywordbooleanclang-format 4 If true, a space will be inserted after the template keyword.
SpaceAroundPointerQualifiersstringclang-format 12 Defines in which cases to put a space before or after pointer qualifiers
one of: "Default", "Before", "After", "Both"
SpaceBeforeAssignmentOperatorsbooleanclang-format 3.7 If false, spaces will be removed before assignment operators.
SpaceBeforeCaseColonbooleanclang-format 12 If false, spaces will be removed before case colon.
SpaceBeforeCpp11BracedListbooleanclang-format 7 If true, a space will be inserted before a C++11 braced list used to initialize an object (after the preceding identifier or type).
SpaceBeforeCtorInitializerColonbooleanclang-format 7 If false, spaces will be removed before constructor initializer colon.
SpaceBeforeInheritanceColonbooleanclang-format 7 If false, spaces will be removed before inheritance colon.
SpaceBeforeJsonColonbooleanclang-format 17 If true, a space will be added before a JSON colon. For other languages, e.g. JavaScript, use SpacesInContainerLiterals instead.
SpaceBeforeParensstringclang-format 3.5 Defines in which cases to put a space before opening parentheses.
one of: "ControlStatements…, "Never", "ControlStatements…, "NonEmptyParenthes…, "Always", "Custom"
SpaceBeforeParensOptionsobjectclang-format 14 Control of individual space before parentheses. If SpaceBeforeParens is set to Custom, use this to specify how each individual space before parentheses case should be handled. Otherwise, this is ignored.
SpaceBeforeParensOptions.AfterControlStatementsbooleanIf true, put space between control statement keywords (for/if/while…) and opening parentheses.
SpaceBeforeParensOptions.AfterForeachMacrosbooleanIf true, put space between foreach macros and opening parentheses.
SpaceBeforeParensOptions.AfterFunctionDeclarationNamebooleanIf true, put a space between function declaration name and opening parentheses.
SpaceBeforeParensOptions.AfterFunctionDefinitionNamebooleanIf true, put a space between function definition name and opening parentheses.
SpaceBeforeParensOptions.AfterIfMacrosbooleanIf true, put space between if macros and opening parentheses.
SpaceBeforeParensOptions.AfterOverloadedOperatorbooleanIf true, put a space between operator overloading and opening parentheses.
SpaceBeforeParensOptions.AfterPlacementOperatorbooleanIf true, put a space between operator new/delete and opening parenthesis.
SpaceBeforeParensOptions.AfterRequiresInClausebooleanIf true, put space between requires keyword in a requires clause and opening parentheses, if there is one.
SpaceBeforeParensOptions.AfterRequiresInExpressionbooleanIf true, put space between requires keyword in a requires expression and opening parentheses.
SpaceBeforeParensOptions.BeforeNonEmptyParenthesesbooleanIf true, put a space before opening parentheses only if the parentheses are not empty.
SpaceBeforeParensOptions.AfterNotbooleanIf true, put a space between alternative operator not and the opening parenthesis.
SpaceBeforeRangeBasedForLoopColonbooleanclang-format 7 If false, spaces will be removed before range-based for loop colon.
SpaceBeforeSquareBracketsbooleanclang-format 10 If true, spaces will be before [. Lambdas will not be affected. Only the first [ will get a space added.
SpaceInEmptyBlockbooleanclang-format 10 If true, spaces will be inserted into {}.
SpaceInEmptyParenthesesbooleanclang-format 3.7 If true, spaces may be inserted into (). This option is deprecated in clang-format 17. See InEmptyParentheses of SpacesInParensOptions.
SpacesBeforeTrailingCommentsintegerclang-format 3.7 The number of spaces before trailing line comments (// - comments). This does not affect trailing block comments (/* - comments) as those commonly have different usage patterns and a number of special cases. In the case of
SpacesInAnglesstringclang-format 3.4 The SpacesInAnglesStyle to use for template argument lists.
one of: "Never", "Always", "Leave"
SpacesInCStyleCastParenthesesbooleanclang-format 3.7 If true, spaces may be inserted into C style casts. This option is deprecated in clang-format 17. See InCStyleCasts of SpacesInParensOptions.
SpacesInConditionalStatementbooleanclang-format 10 If true, spaces will be inserted around if/for/switch/while conditions. This option is deprecated in clang-format 17. See InConditionalStatements of SpacesInParensOptions.
SpacesInContainerLiteralsbooleanclang-format 3.7 If true, spaces are inserted inside container literals (e.g. ObjC and Javascript array and dict literals). For JSON, use SpaceBeforeJsonColon instead.
SpacesInLineCommentPrefixobjectclang-format 13 How many spaces are allowed at the start of a line comment. To disable the maximum set it to -1, apart from that the maximum takes precedence over the minimum. In clang-format 16, this option has only effect if
SpacesInLineCommentPrefix.Minimuminteger
default: 1
SpacesInLineCommentPrefix.Maximuminteger
default: 1
SpacesInParensstringclang-format 17 Defines in which cases spaces will be inserted after ( and before ).
one of: "Never", "Custom"
SpacesInParensOptionsobjectclang-format 17 Control of individual spaces in parentheses. If SpacesInParens is set to Custom, use this to specify how each individual space in parentheses case should be handled. Otherwise, this is ignored.
SpacesInParensOptions.InConditionalStatementsboolean
SpacesInParensOptions.InCStyleCastsboolean
SpacesInParensOptions.InEmptyParenthesesboolean
SpacesInParensOptions.Otherboolean
SpacesInParensOptions.ExceptDoubleParenthesesbooleanOverride any of the following options to prevent addition of space when both opening and closing parentheses use multiple parentheses.
SpacesInParenthesesbooleanclang-format 3.7 If true, spaces will be inserted after ( and before ). This option is deprecated in clang-format 17. The previous behavior is preserved by using SpacesInParens with Custom and by setting all SpacesInParensOptions to true
SpacesInSquareBracketsbooleanclang-format 3.7 If true, spaces will be inserted after [ and before ]. Lambdas without arguments or unspecified size array declarations will not be affected.
Standardstringclang-format 3.7 Parse and format C++ constructs compatible with this standard.
one of: "Auto", "Latest", "c++03", "c++11", "c++14", "c++17" … (+1)
StatementAttributeLikeMacrosarray<string>clang-format 12 Macros which are ignored in front of a statement, as if they were an attribute. So that they are not parsed as identifier, for example for Qts emit.
StatementMacrosarray<string>clnag-format 8 A vector of macros that should be interpreted as complete statements. Typical macros are expressions, and require a semi-colon to be added; sometimes this is not the case, and this allows to make clang-format aware of such
TabWidthintegerclang-format 3.7 The number of columns used for tab stops.
TypeNamesarray<string>clang-format 17 A vector of non-keyword identifiers that should be interpreted as type names. A *, &, or && between a type name and another non-keyword identifier is annotated as a pointer or reference token instead of a binary operator.
TypenameMacrosarray<string>clang-format 9 A vector of macros that should be interpreted as type declarations instead of as function calls. For example: OpenSSL STACK_OF, BSD LIST_ENTRY.
UseCRLFbooleanclang-format 10 Use instead of for line breaks. Also used as fallback if DeriveLineEnding is true. This option is deprecated in clang-format 16. See LF and CRLF of LineEnding.
UseTabstringclang-format 3.7 The way to use tab characters in the resulting file.
one of: "Never", "ForIndentation", "ForContinuationAn…, "AlignWithSpaces", "Always"
VerilogBreakBetweenInstancePortsbooleanclang-format 17 For Verilog, put each port on its own line in module instantiations.
WhitespaceSensitiveMacrosarray<string>clang-format 11 A vector of macros which are whitespace-sensitive and should not be touched. For example: BOOST_PP_STRINGIZE
AlignConsecutiveTableGenBreakingDAGArgColonsoneOfclang-format 19 Style of aligning consecutive TableGen DAGArg operator colons. If enabled, align the colon inside DAGArg which have line break inside. This works only when TableGenBreakInsideDAGArg is BreakElements or BreakAll and the
AlignConsecutiveTableGenCondOperatorColonsoneOfclang-format 19 Style of aligning consecutive TableGen cond operator colons. Align the colons of cases inside !cond operators.
AlignConsecutiveTableGenDefinitionColonsoneOfclang-format 19 Style of aligning consecutive TableGen definition colons. This aligns the inheritance colons of consecutive definitions.
AllowShortCaseExpressionOnASingleLinebooleanclang-format 19 Whether to merge a short switch labeled rule into a single line.
AllowShortNamespacesOnASingleLinebooleanclang-format 20 If true, namespace a { class b; } can be put on a single line.
BinPackLongBracedListbooleanclang-format 21 If BinPackLongBracedList is true it overrides BinPackArguments if there are 20 or more items in a braced initializer list.
BreakAfterReturnTypestringclang-format 19 The function declaration return type breaking style to use.
one of: "Automatic", "ExceptShortType", "None", "All", "TopLevel", "AllDefinitions" … (+1)
BreakBeforeTemplateCloserbooleanclang-format 21 If true, break before a template closing bracket (>) when there is a line break after the matching opening bracket (<).
BreakBinaryOperationsstringclang-format 20 The break binary operations style to use.
one of: "Never", "OnePerLine", "RespectPrecedence…
BreakFunctionDefinitionParametersbooleanclang-format 19 If true, clang-format will always break before function definition parameters.
BreakTemplateDeclarationsstringclang-format 19 The template declaration breaking style to use.
one of: "Leave", "No", "MultiLine", "Yes"
EnumTrailingCommastringclang-format 21 Insert a comma (if missing) or remove the comma at the end of an enum enumerator list. Warning: Setting this option to any value other than Leave could lead to incorrect code formatting due to clang-format’s lack of
one of: "Leave", "Insert", "Remove"
IndentExportBlockbooleanclang-format 20 If true, clang-format will indent the body of an export { ... } block. This doesn’t affect the formatting of anything else related to exported declarations.
JavaImportGroupsarray<string>clang-format 8 A vector of prefixes ordered by the desired groups for Java imports.
KeepEmptyLinesobjectclang-format 19 Which empty lines are kept. See MaxEmptyLinesToKeep for how many consecutive empty lines are kept.
KeepEmptyLines.AtEndOfFilebooleanKeep empty lines at end of file.
KeepEmptyLines.AtStartOfBlockbooleanKeep empty lines at start of a block.
KeepEmptyLines.AtStartOfFilebooleanKeep empty lines at start of file.
KeepFormFeedbooleanclang-format 20 Keep the form feed character if it's immediately preceded and followed by a newline.
MacrosSkippedByRemoveParenthesesarray<string>clang-format 21 A vector of function-like macros whose invocations should be skipped by RemoveParentheses.
MainIncludeCharstringclang-format 19 When guessing whether a #include is the "main" include, only the include directives that use the specified character are considered.
one of: "Quote", "AngleBracket", "Any"
OneLineFormatOffRegexstringclang-format 21 A regular expression that describes markers for turning formatting off for one line.
PenaltyBreakBeforeMemberAccessintegerclang-format 20 The penalty for breaking before a member access operator (., ->).
RemoveEmptyLinesInUnwrappedLinesbooleanclang-format 20 Remove empty lines within unwrapped lines.
SpaceAfterOperatorKeywordbooleanclang-format 21 If true, a space will be inserted after the operator keyword.
TableGenBreakInsideDAGArgstringclang-format 19 The styles of the line break inside the DAGArg in TableGen.
one of: "DontBreak", "BreakElements", "BreakAll"
TableGenBreakingDAGArgOperatorsarray<string>clang-format 19 Works only when TableGenBreakInsideDAGArg is not DontBreak. If any identifier is specified, this limits the line breaks by TableGenBreakInsideDAGArg option only on DAGArg values beginning with the specified identifiers.
TemplateNamesarray<string>clang-format 20 A vector of non-keyword identifiers that should be interpreted as template names. A < after a template name is annotated as a template opener instead of a binary operator.
VariableTemplatesarray<string>clang-format 20 A vector of non-keyword identifiers that should be interpreted as variable template names. A ) after a variable template instantiation is not annotated as the closing parenthesis of C-style cast operator.
WrapNamespaceBodyWithEmptyLinesstringclang-format 20 Wrap namespace body with empty lines.
one of: "Never", "Always", "Leave"

What we found in this schema

Specification sections for the keywords in this schema

Keyword Document Section
$commentJSON Schema Core, draft 2020-12§8.3 — Comments With "$comment"
$defsJSON Schema Core, draft 2020-12§8.2.4 — Schema Re-Use With "$defs"
$idJSON Schema Core, draft 2020-12§8.2.1 — The "$id" Keyword
$refJSON Schema Core, draft 2020-12§8.2.3.1 — Direct References with "$ref"
$schemaJSON Schema Core, draft 2020-12§8.1.1 — "$schema"
additionalPropertiesJSON Schema Core, draft 2020-12§10.3.2.3 — "additionalProperties"
defaultJSON Schema Validation, draft 2020-12§9.2 — "default"
descriptionJSON Schema Validation, draft 2020-12§9.1 — "title" and "description"
enumJSON Schema Validation, draft 2020-12§6.1.2 — "enum"
examplesJSON Schema Validation, draft 2020-12§9.5 — "examples"
itemsJSON Schema Core, draft 2020-12§10.3.1.2 — "items"
minimumJSON Schema Validation, draft 2020-12§6.2.4 — "minimum"
oneOfJSON Schema Core, draft 2020-12§10.2.1.3 — "oneOf"
patternPropertiesJSON Schema Core, draft 2020-12§10.3.2.2 — "patternProperties"
propertiesJSON Schema Core, draft 2020-12§10.3.2.1 — "properties"
typeJSON Schema Validation, draft 2020-12§6.1.1 — "type"

Documents

Attribution

This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.

← All schemas