Debian Codegraph @

.clang-format

raw
1 # SPDX-License-Identifier: GPL-2.0-only
2 #
3 # clang-format configuration file. Intended for clang-format >= 16.
4 #
5 # For more information, see:
6 #
7 # https://clang.llvm.org/docs/ClangFormat.html
8 # https://clang.llvm.org/docs/ClangFormatStyleOptions.html
9 # https://clang-format-configurator.site/
10 #
11
12 ---
13 Language: Cpp
14 AccessModifierOffset: -4
15 AlignAfterOpenBracket: Align
16 AlignArrayOfStructures: Left
17 AlignConsecutiveAssignments:
18 Enabled: false
19 AcrossEmptyLines: false
20 AcrossComments: true
21 AlignCompound: false
22 PadOperators: true
23 AlignConsecutiveBitFields:
24 Enabled: true
25 AcrossEmptyLines: false
26 AcrossComments: false
27 AlignCompound: false
28 PadOperators: true
29 AlignConsecutiveDeclarations:
30 Enabled: false
31 AcrossEmptyLines: false
32 AcrossComments: false
33 AlignCompound: false
34 PadOperators: true
35 AlignConsecutiveMacros:
36 Enabled: true
37 AcrossEmptyLines: false
38 AcrossComments: false
39 AlignCompound: false
40 PadOperators: true
41 AlignEscapedNewlines: Left
42 AlignOperands: Align
43 AlignTrailingComments:
44 Kind: Always
45 OverEmptyLines: 0
46 AllowAllArgumentsOnNextLine: true
47 AllowAllParametersOfDeclarationOnNextLine: false
48 AllowShortBlocksOnASingleLine: Never
49 AllowShortCaseLabelsOnASingleLine: false
50 AllowShortEnumsOnASingleLine: true
51 AllowShortFunctionsOnASingleLine: None
52 AllowShortIfStatementsOnASingleLine: Never
53 AllowShortLambdasOnASingleLine: All
54 AllowShortLoopsOnASingleLine: false
55 AlwaysBreakAfterDefinitionReturnType: None
56 AlwaysBreakAfterReturnType: None
57 AlwaysBreakBeforeMultilineStrings: false
58 AlwaysBreakTemplateDeclarations: MultiLine
59
60 # git grep '^#define [^[:space:]]*__.*[^[:space:]]*__attribute__' | grep -v "vendorcode\|payloads\|util" | sed "s|.*:||;s|^#define \([^[:space:]]*__[^([:space:]]*\).*$| - '\1'|" | LC_ALL=C sort -u
61 AttributeMacros:
62 - '__aligned'
63 - '__always_inline'
64 - '__always_unused'
65 - '__cpu_driver'
66 - '__fallthrough'
67 - '__maybe_unused'
68 - '__must_check'
69 - '__noreturn'
70 - '__packed'
71 - '__pci_driver'
72 - '__printf'
73 - '__weak'
74 BinPackArguments: true
75 BinPackParameters: true
76 BitFieldColonSpacing: Both
77 BraceWrapping:
78 AfterCaseLabel: false
79 AfterClass: false
80 AfterControlStatement: Never
81 AfterEnum: false
82 AfterExternBlock: false
83 AfterFunction: true
84 AfterNamespace: true
85 AfterObjCDeclaration: false
86 AfterStruct: false
87 AfterUnion: false
88 BeforeCatch: false
89 BeforeElse: false
90 BeforeLambdaBody: false
91 BeforeWhile: false
92 IndentBraces: false
93 SplitEmptyFunction: true
94 SplitEmptyRecord: true
95 SplitEmptyNamespace: true
96 BreakAfterAttributes: Never
97 BreakAfterJavaFieldAnnotations: false
98 BreakArrays: false
99 BreakBeforeBinaryOperators: None
100 BreakBeforeConceptDeclarations: Always
101 BreakBeforeBraces: Custom
102 BreakBeforeInlineASMColon: OnlyMultiline
103 BreakBeforeTernaryOperators: false
104 BreakConstructorInitializers: AfterColon
105 BreakInheritanceList: AfterColon
106 BreakStringLiterals: false
107 ColumnLimit: 96
108 CommentPragmas: '^ IWYU pragma:'
109 CompactNamespaces: false
110 ConstructorInitializerIndentWidth: 8
111 ContinuationIndentWidth: 8
112 Cpp11BracedListStyle: true
113 DerivePointerAlignment: false
114 DisableFormat: false
115 EmptyLineAfterAccessModifier: Never
116 EmptyLineBeforeAccessModifier: LogicalBlock
117 ExperimentalAutoDetectBinPacking: false
118 FixNamespaceComments: false
119
120 # git grep '^#define [^[:space:]]*for_each[^[:space:]]*(' | grep -v "vendorcode\|payloads\|util" | sed "s|.*:||;s|^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$| - '\1'|" | LC_ALL=C sort -u
121 ForEachMacros:
122 - 'list_for_each'
123
124 # git grep -i '^#define \+if[^[:space:]]*(' | grep -v "vendorcode\|payloads\|util" | sed "s|.*:||;s|^#define \([^[:space:]]*if[^[:space:]]*\)(.*$| - '\1'|I" | grep -v IFIX | LC_ALL=C sort -u
125 IfMacros:
126 - 'IF_CHANNEL_POPULATED'
127 - 'IF_DIMM_POPULATED'
128 - 'IF_RANK_POPULATED'
129 - 'IfBit0'
130 IncludeBlocks: Preserve
131 IncludeIsMainSourceRegex: ''
132 IndentAccessModifiers: false
133 IndentCaseBlocks: false
134 IndentCaseLabels: false
135 IndentExternBlock: AfterExternBlock
136 IndentGotoLabels: false
137 IndentPPDirectives: None
138 IndentRequiresClause: true
139 IndentWidth: 8
140 IndentWrappedFunctionNames: false
141 InsertBraces: false
142 InsertNewlineAtEOF: true
143 InsertTrailingCommas: None
144 IntegerLiteralSeparator:
145 Binary: 0
146 BinaryMinDigits: 0
147 Decimal: 0
148 DecimalMinDigits: 0
149 Hex: 0
150 HexMinDigits: 0
151 JavaScriptQuotes: Leave
152 JavaScriptWrapImports: true
153 KeepEmptyLinesAtTheStartOfBlocks: false
154 LambdaBodyIndentation: Signature
155 LineEnding: LF
156 MacroBlockBegin: ''
157 MacroBlockEnd: ''
158 MaxEmptyLinesToKeep: 1
159 NamespaceIndentation: None
160 ObjCBinPackProtocolList: Auto
161 ObjCBlockIndentWidth: 8
162 ObjCBreakBeforeNestedBlockParam: true
163 ObjCSpaceAfterProperty: true
164 ObjCSpaceBeforeProtocolList: true
165 PackConstructorInitializers: BinPack
166 PenaltyBreakAssignment: 10
167 PenaltyBreakBeforeFirstCallParameter: 30
168 PenaltyBreakComment: 10
169 PenaltyBreakFirstLessLess: 0
170 PenaltyBreakOpenParenthesis: 0
171 PenaltyBreakString: 10
172 PenaltyBreakTemplateDeclaration: 10
173 PenaltyExcessCharacter: 100
174 PenaltyIndentedWhitespace: 0
175 PenaltyReturnTypeOnItsOwnLine: 60
176 PointerAlignment: Right
177 PPIndentWidth: -1
178 QualifierAlignment: Left
179 ReferenceAlignment: Pointer
180 ReflowComments: false
181 RemoveBracesLLVM: false
182 RemoveSemicolon: false
183 RequiresClausePosition: OwnLine
184 RequiresExpressionIndentation: OuterScope
185 SeparateDefinitionBlocks: Leave
186 ShortNamespaceLines: 1
187 SortIncludes: Never
188 SortJavaStaticImport: Before
189 SortUsingDeclarations: Never
190 SpaceAfterCStyleCast: false
191 SpaceAfterLogicalNot: false
192 SpaceAfterTemplateKeyword: true
193 SpaceAroundPointerQualifiers: Default
194 SpaceBeforeAssignmentOperators: true
195 SpaceBeforeCaseColon: false
196 SpaceBeforeCpp11BracedList: false
197 SpaceBeforeCtorInitializerColon: true
198 SpaceBeforeInheritanceColon: true
199 SpaceBeforeParens: ControlStatementsExceptControlMacros
200 SpaceBeforeParensOptions:
201 AfterControlStatements: true
202 AfterForeachMacros: false
203 AfterFunctionDefinitionName: false
204 AfterFunctionDeclarationName: false
205 AfterIfMacros: false
206 AfterOverloadedOperator: false
207 AfterRequiresInClause: false
208 AfterRequiresInExpression: false
209 BeforeNonEmptyParentheses: false
210 SpaceBeforeRangeBasedForLoopColon: true
211 SpaceBeforeSquareBrackets: false
212 SpaceInEmptyBlock: false
213 SpaceInEmptyParentheses: false
214 SpacesBeforeTrailingComments: 1
215 SpacesInAngles: Never
216 SpacesInConditionalStatement: false
217 SpacesInContainerLiterals: false
218 SpacesInCStyleCastParentheses: false
219 SpacesInLineCommentPrefix:
220 Minimum: 1
221 Maximum: 1
222 SpacesInParentheses: false
223 SpacesInSquareBrackets: false
224 Standard: c++17
225 TabWidth: 8
226 UseTab: ForContinuationAndIndentation
227 ...
228