xref: /aosp_15_r20/external/deqp/.clang-format (revision 35238bce31c2a825756842865a792f8cf7f89930)
1# The style used for all options not specifically set in the configuration.
2BasedOnStyle: LLVM
3
4# The extra indent or outdent of access modifiers, e.g. public:.
5AccessModifierOffset: -4
6
7# Aligns escaped newlines as far left as possible
8AlignEscapedNewlines: Left
9
10# This will align the assignment operators of consecutive lines.
11AlignConsecutiveAssignments: Consecutive
12
13# Do not align the declaration names.
14AlignConsecutiveDeclarations: None
15
16# Align the bitfield in declarations
17AlignConsecutiveBitFields: Consecutive
18
19# If true, aligns trailing comments.
20AlignTrailingComments: true
21
22# Align operands when the expression is broken in multiple lines.
23AlignOperands: Align
24
25# Allow putting all parameters of a function declaration onto the next line even if BinPackParameters is false.
26AllowAllParametersOfDeclarationOnNextLine: false
27
28# Allows contracting simple braced statements to a single line.
29AllowShortBlocksOnASingleLine: false
30
31# If true, short case labels will be contracted to a single line.
32AllowShortCaseLabelsOnASingleLine: false
33
34# Dependent on the value, int f() { return 0; } can be put on a single line. Possible values: None, Inline, All.
35AllowShortFunctionsOnASingleLine: None
36
37# If true, if (a) return; can be put on a single line.
38AllowShortIfStatementsOnASingleLine: false
39
40# If true, while (true) continue; can be put on a single line.
41AllowShortLoopsOnASingleLine: false
42
43# If true, always break after function definition return types.
44AlwaysBreakAfterDefinitionReturnType: None
45AlwaysBreakAfterReturnType: None
46
47# If true, always break before multiline string literals.
48AlwaysBreakBeforeMultilineStrings: false
49
50# If true, always break after the template<...> of a template declaration.
51AlwaysBreakTemplateDeclarations: Yes
52
53# If false, a function call's arguments will either be all on the same line or will have one line each.
54BinPackArguments: true
55
56# If false, a function declaration's or function definition's parameters will either all be on the same line
57# or will have one line each.
58BinPackParameters: true
59
60# The way to wrap binary operators. Possible values: None, NonAssignment, All.
61BreakBeforeBinaryOperators: None
62
63# The brace breaking style to use. Possible values: Attach, Linux, Stroustrup, Allman, GNU.
64BreakBeforeBraces: Allman
65
66# If true, ternary operators will be placed after line breaks.
67BreakBeforeTernaryOperators: false
68
69# Always break constructor initializers before commas and align the commas with the colon.
70BreakConstructorInitializers: BeforeComma
71
72# The column limit. A column limit of 0 means that there is no column limit.
73ColumnLimit: 120
74
75# A regular expression that describes comments with special meaning, which should not be split into lines or otherwise changed.
76CommentPragmas: '^ *'
77
78# If the constructor initializers don't fit on a line, put each initializer on its own line.
79PackConstructorInitializers: CurrentLine
80
81# The number of characters to use for indentation of constructor initializer lists.
82ConstructorInitializerIndentWidth: 4
83
84# Indent width for line continuations.
85ContinuationIndentWidth: 4
86
87# If true, format braced lists as best suited for C++11 braced lists.
88Cpp11BracedListStyle: true
89
90# Disables formatting at all.
91DisableFormat: false
92
93# Indent case labels one level from the switch statement.
94# When false, use the same indentation level as for the switch statement.
95# Switch statement body is always indented one level more than case labels.
96IndentCaseLabels: false
97
98# The number of columns to use for indentation.
99IndentWidth: 4
100
101# Indent if a function definition or declaration is wrapped after the type.
102IndentWrappedFunctionNames: false
103
104# If true, empty lines at the start of blocks are kept.
105KeepEmptyLinesAtTheStartOfBlocks: true
106
107# Language, this format style is targeted at. Possible values: None, Cpp, Java, JavaScript, Proto.
108Language: Cpp
109
110# The maximum number of consecutive empty lines to keep.
111MaxEmptyLinesToKeep: 1
112
113# The indentation used for namespaces. Possible values: None, Inner, All.
114NamespaceIndentation: None
115
116# The penalty for breaking a function call after "call(".
117PenaltyBreakBeforeFirstCallParameter: 19
118
119# The penalty for each line break introduced inside a comment.
120PenaltyBreakComment: 300
121
122# The penalty for breaking before the first <<.
123PenaltyBreakFirstLessLess: 400
124
125# The penalty for each line break introduced inside a string literal.
126PenaltyBreakString: 1000
127
128# The penalty for each character outside of the column limit.
129PenaltyExcessCharacter: 1000000
130
131# Penalty for putting the return type of a function onto its own line.
132PenaltyReturnTypeOnItsOwnLine: 1000000000
133
134# Pointer and reference alignment style. Possible values: Left, Right, Middle.
135PointerAlignment: Right
136
137# Do not sort includes, many generated headers don't appropriately include what they rely on.
138SortIncludes: Never
139
140# If true, a space may be inserted after C style casts.
141SpaceAfterCStyleCast: false
142
143# If false, spaces will be removed before assignment operators.
144SpaceBeforeAssignmentOperators: true
145
146# Defines in which cases to put a space before opening parentheses. Possible values: Never, ControlStatements, Always.
147SpaceBeforeParens: ControlStatements
148
149# If true, spaces may be inserted into '()'.
150SpaceInEmptyParentheses: false
151
152# The number of spaces before trailing line comments (// - comments).
153SpacesBeforeTrailingComments: 1
154
155# If true, spaces will be inserted after '<' and before '>' in template argument lists.
156SpacesInAngles: false
157
158# If true, spaces may be inserted into C style casts.
159SpacesInCStyleCastParentheses: false
160
161# If true, spaces are inserted inside container literals (e.g. ObjC and Javascript array and dict literals).
162SpacesInContainerLiterals: false
163
164# If true, spaces will be inserted after '(' and before ')'.
165SpacesInParentheses: false
166
167# If true, spaces will be inserted after '[' and before ']'.
168SpacesInSquareBrackets: false
169
170# Format compatible with this standard, e.g. use A<A<int> > instead of A<A<int>> for LS_Cpp03. Possible values: Cpp03, Cpp11, Auto.
171Standard: Cpp11
172
173# The number of columns used for tab stops.
174TabWidth: 4
175
176# The way to use tab characters in the resulting file. Possible values: Never, ForIndentation, Always.
177UseTab: Never
178
179# Support formatting other languages too, mostly using default configs
180---
181Language: Java
182IndentWidth: 4
183---
184Language: Json
185IndentWidth: 4
186---
187Language: ObjC
188IndentWidth: 4
189BreakBeforeBraces: Allman
190