1 # Copyright 2016-2021 The Khronos Group Inc.
2 # SPDX-License-Identifier: Apache-2.0
4 # The style used for all options not specifically set in the configuration.
7 # The extra indent or outdent of access modifiers, e.g. public:.
8 AccessModifierOffset: -4
10 # If true, aligns escaped newlines as far left as possible. Otherwise puts them into the right-most column.
11 AlignEscapedNewlinesLeft: true
13 # If true, aligns trailing comments.
14 AlignTrailingComments: false
16 # Allow putting all parameters of a function declaration onto the next line even if BinPackParameters is false.
17 AllowAllParametersOfDeclarationOnNextLine: false
19 # Allows contracting simple braced statements to a single line.
20 AllowShortBlocksOnASingleLine: false
22 # If true, short case labels will be contracted to a single line.
23 AllowShortCaseLabelsOnASingleLine: false
25 # Dependent on the value, int f() { return 0; } can be put on a single line. Possible values: None, Inline, All.
26 AllowShortFunctionsOnASingleLine: None
28 # If true, if (a) return; can be put on a single line.
29 AllowShortIfStatementsOnASingleLine: false
31 # If true, while (true) continue; can be put on a single line.
32 AllowShortLoopsOnASingleLine: false
34 # If true, always break after function definition return types.
35 AlwaysBreakAfterDefinitionReturnType: false
37 # If true, always break before multiline string literals.
38 AlwaysBreakBeforeMultilineStrings: false
40 # If true, always break after the template<...> of a template declaration.
41 AlwaysBreakTemplateDeclarations: true
43 # If false, a function call's arguments will either be all on the same line or will have one line each.
44 BinPackArguments: true
46 # If false, a function declaration's or function definition's parameters will either all be on the same line
47 # or will have one line each.
48 BinPackParameters: true
50 # The way to wrap binary operators. Possible values: None, NonAssignment, All.
51 BreakBeforeBinaryOperators: None
53 # The brace breaking style to use. Possible values: Attach, Linux, Stroustrup, Allman, GNU.
54 BreakBeforeBraces: Allman
56 # If true, ternary operators will be placed after line breaks.
57 BreakBeforeTernaryOperators: false
59 # Always break constructor initializers before commas and align the commas with the colon.
60 BreakConstructorInitializersBeforeComma: true
62 # The column limit. A column limit of 0 means that there is no column limit.
65 # A regular expression that describes comments with special meaning, which should not be split into lines or otherwise changed.
68 # If the constructor initializers don't fit on a line, put each initializer on its own line.
69 ConstructorInitializerAllOnOneLineOrOnePerLine: false
71 # The number of characters to use for indentation of constructor initializer lists.
72 ConstructorInitializerIndentWidth: 4
74 # Indent width for line continuations.
75 ContinuationIndentWidth: 4
77 # If true, format braced lists as best suited for C++11 braced lists.
78 Cpp11BracedListStyle: false
80 # Disables formatting at all.
83 # A vector of macros that should be interpreted as foreach loops instead of as function calls.
86 # Indent case labels one level from the switch statement.
87 # When false, use the same indentation level as for the switch statement.
88 # Switch statement body is always indented one level more than case labels.
89 IndentCaseLabels: false
91 # The number of columns to use for indentation.
94 # Indent if a function definition or declaration is wrapped after the type.
95 IndentWrappedFunctionNames: false
97 # If true, empty lines at the start of blocks are kept.
98 KeepEmptyLinesAtTheStartOfBlocks: true
100 # Language, this format style is targeted at. Possible values: None, Cpp, Java, JavaScript, Proto.
103 # The maximum number of consecutive empty lines to keep.
104 MaxEmptyLinesToKeep: 1
106 # The indentation used for namespaces. Possible values: None, Inner, All.
107 NamespaceIndentation: None
109 # The penalty for breaking a function call after "call(".
110 PenaltyBreakBeforeFirstCallParameter: 19
112 # The penalty for each line break introduced inside a comment.
113 PenaltyBreakComment: 300
115 # The penalty for breaking before the first <<.
116 PenaltyBreakFirstLessLess: 120
118 # The penalty for each line break introduced inside a string literal.
119 PenaltyBreakString: 1000
121 # The penalty for each character outside of the column limit.
122 PenaltyExcessCharacter: 1000000
124 # Penalty for putting the return type of a function onto its own line.
125 PenaltyReturnTypeOnItsOwnLine: 1000000000
127 # Pointer and reference alignment style. Possible values: Left, Right, Middle.
128 PointerAlignment: Right
130 # If true, a space may be inserted after C style casts.
131 SpaceAfterCStyleCast: false
133 # If false, spaces will be removed before assignment operators.
134 SpaceBeforeAssignmentOperators: true
136 # Defines in which cases to put a space before opening parentheses. Possible values: Never, ControlStatements, Always.
137 SpaceBeforeParens: ControlStatements
139 # If true, spaces may be inserted into '()'.
140 SpaceInEmptyParentheses: false
142 # The number of spaces before trailing line comments (// - comments).
143 SpacesBeforeTrailingComments: 1
145 # If true, spaces will be inserted after '<' and before '>' in template argument lists.
146 SpacesInAngles: false
148 # If true, spaces may be inserted into C style casts.
149 SpacesInCStyleCastParentheses: false
151 # If true, spaces are inserted inside container literals (e.g. ObjC and Javascript array and dict literals).
152 SpacesInContainerLiterals: false
154 # If true, spaces will be inserted after '(' and before ')'.
155 SpacesInParentheses: false
157 # If true, spaces will be inserted after '[' and befor']'.
158 SpacesInSquareBrackets: false
160 # Format compatible with this standard, e.g. use A<A<int> > instead of A<A<int>> for LS_Cpp03. Possible values: Cpp03, Cpp11, Auto.
163 # The number of columns used for tab stops.
166 # The way to use tab characters in the resulting file. Possible values: Never, ForIndentation, Always.
167 UseTab: ForIndentation
169 # Do not reflow comments
170 ReflowComments: false