Debian Codegraph @

.clang-format

raw
1 ---
2 # Reference: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
3 Language: Cpp
4 BasedOnStyle: LLVM
5 AccessModifierOffset: -4
6 AlignAfterOpenBracket: Align
7 AlignArrayOfStructures: None
8 AlignConsecutiveAssignments: None
9 AlignConsecutiveBitFields: AcrossEmptyLines
10 AlignConsecutiveDeclarations: None
11 AlignConsecutiveMacros: Consecutive
12 AlignEscapedNewlines: Right
13 AlignOperands: Align
14 AlignTrailingComments:
15 Kind: Always
16 OverEmptyLines: 1
17 AllowAllArgumentsOnNextLine: false
18 AllowAllParametersOfDeclarationOnNextLine: false
19 AllowBreakBeforeNoexceptSpecifier: OnlyWithParen
20 AllowShortBlocksOnASingleLine: Never
21 AllowShortCaseExpressionOnASingleLine: true
22 AllowShortCaseLabelsOnASingleLine: false
23 AllowShortCompoundRequirementOnASingleLine: true
24 AllowShortEnumsOnASingleLine: true
25 AllowShortFunctionsOnASingleLine: All
26 AllowShortIfStatementsOnASingleLine: WithoutElse
27 AllowShortLambdasOnASingleLine: All
28 AllowShortLoopsOnASingleLine: true
29 AlwaysBreakAfterDefinitionReturnType: None
30 AlwaysBreakBeforeMultilineStrings: true
31 BinPackArguments: true
32 BinPackParameters: true
33 BitFieldColonSpacing: None
34 BraceWrapping:
35 AfterCaseLabel: false
36 AfterClass: false
37 AfterControlStatement: Never
38 AfterEnum: false
39 AfterExternBlock: false
40 AfterFunction: true
41 AfterNamespace: false
42 AfterObjCDeclaration: false
43 AfterStruct: false
44 AfterUnion: false
45 BeforeCatch: true
46 BeforeElse: false
47 BeforeLambdaBody: false
48 BeforeWhile: false
49 IndentBraces: false
50 SplitEmptyFunction: true
51 SplitEmptyRecord: true
52 SplitEmptyNamespace: true
53 BreakAdjacentStringLiterals: true
54 BreakAfterAttributes: Leave
55 BreakAfterReturnType: AllDefinitions
56 BreakBeforeBinaryOperators: NonAssignment
57 BreakBeforeConceptDeclarations: Always
58 BreakBeforeBraces: Custom
59 BreakBeforeInlineASMColon: OnlyMultiline
60 BreakBeforeTernaryOperators: true
61 BreakConstructorInitializers: BeforeColon
62 BreakFunctionDefinitionParameters: false
63 BreakInheritanceList: BeforeColon
64 BreakStringLiterals: true
65 BreakTemplateDeclarations: Yes
66 ColumnLimit: 79
67 CompactNamespaces: false
68 ConstructorInitializerIndentWidth: 4
69 ContinuationIndentWidth: 4
70 Cpp11BracedListStyle: false
71 DerivePointerAlignment: true
72 EmptyLineAfterAccessModifier: Never
73 EmptyLineBeforeAccessModifier: LogicalBlock
74 FixNamespaceComments: true
75 IncludeBlocks: Preserve
76 IncludeCategories:
77 - Regex: '^[<"]Python\.h[">]$'
78 Priority: 2
79 CaseSensitive: true
80 - Regex: '^<[[:alnum:]_/]+(\.h)?>$'
81 Priority: 1
82 - Regex: '.*'
83 Priority: 3
84 IndentAccessModifiers: false
85 IndentCaseBlocks: false
86 IndentCaseLabels: false
87 IndentExternBlock: NoIndent
88 IndentGotoLabels: false
89 IndentPPDirectives: None
90 IndentRequiresClause: true
91 IndentWidth: 4
92 IndentWrappedFunctionNames: false
93 InsertBraces: false
94 InsertNewlineAtEOF: true
95 InsertTrailingCommas: None
96 KeepEmptyLines:
97 AtEndOfFile: false
98 AtStartOfBlock: false
99 AtStartOfFile: false
100 LambdaBodyIndentation: Signature
101 LineEnding: DeriveLF
102 MacroBlockBegin: ''
103 MacroBlockEnd: ''
104 Macros:
105 - >-
106 PyObject_HEAD_INIT(type)={
107 /* this is not exactly match with PyObject_HEAD_INIT in Python source code
108 * but it is enough for clang-format */
109 { 0xFFFFFFFF },
110 (type)
111 },
112 - >-
113 PyVarObject_HEAD_INIT(type, size)={
114 {
115 /* manually expand PyObject_HEAD_INIT(type) above
116 * because clang-format do not support recursive expansion */
117 { 0xFFFFFFFF },
118 (type)
119 },
120 (size)
121 },
122 - PyMODINIT_FUNC=PyObject *
123 - _PyGI_ENUM_BEGIN(name)={
124 - _PyGI_ENUM_ADD_VALUE(prefix, name)=(prefix##_##name);
125 - _PyGI_ENUM_END=}
126 MainIncludeChar: Quote
127 MaxEmptyLinesToKeep: 2
128 NamespaceIndentation: None
129 PackConstructorInitializers: NextLine
130 PenaltyBreakAssignment: 20
131 PenaltyBreakBeforeFirstCallParameter: 1
132 PenaltyBreakComment: 300
133 PenaltyBreakFirstLessLess: 120
134 PenaltyBreakOpenParenthesis: 0
135 PenaltyBreakScopeResolution: 500
136 PenaltyBreakString: 1000
137 PenaltyBreakTemplateDeclaration: 10
138 PenaltyExcessCharacter: 1000000
139 PenaltyIndentedWhitespace: 0
140 PenaltyReturnTypeOnItsOwnLine: 1000000000
141 PointerAlignment: Right
142 PPIndentWidth: -1
143 QualifierAlignment: Custom
144 QualifierOrder:
145 [friend, static, inline, const, constexpr, volatile, type, restrict]
146 ReferenceAlignment: Right
147 ReflowComments: false
148 RemoveBracesLLVM: false
149 RemoveParentheses: MultipleParentheses
150 RemoveSemicolon: true
151 RequiresClausePosition: OwnLine
152 RequiresExpressionIndentation: OuterScope
153 SeparateDefinitionBlocks: Leave
154 ShortNamespaceLines: 1
155 SkipMacroDefinitionBody: false
156 SortIncludes: Never
157 SortUsingDeclarations: LexicographicNumeric
158 SpaceAfterCStyleCast: false
159 SpaceAfterLogicalNot: false
160 SpaceAfterTemplateKeyword: true
161 SpaceAroundPointerQualifiers: Default
162 SpaceBeforeAssignmentOperators: true
163 SpaceBeforeCaseColon: false
164 SpaceBeforeCpp11BracedList: false
165 SpaceBeforeCtorInitializerColon: true
166 SpaceBeforeInheritanceColon: true
167 SpaceBeforeJsonColon: false
168 SpaceBeforeParens: Always
169 SpaceBeforeRangeBasedForLoopColon: true
170 SpaceBeforeSquareBrackets: false
171 SpaceInEmptyBlock: false
172 SpacesBeforeTrailingComments: 2
173 SpacesInAngles: Never
174 SpacesInContainerLiterals: true
175 SpacesInLineCommentPrefix:
176 Minimum: 1
177 Maximum: -1
178 SpacesInParens: Never
179 SpacesInSquareBrackets: false
180 Standard: c++11
181 StatementAttributeLikeMacros:
182 StatementMacros:
183 - PyObject_HEAD
184 TableGenBreakInsideDAGArg: DontBreak
185 TabWidth: 4
186 TypeNames:
187 # Defined in Include/pytypedefs.h
188 - PyModuleDef
189 - PyModuleDef_Slot
190 - PyMethodDef
191 - PyGetSetDef
192 - PyMemberDef
193 - PyObject
194 - PyLongObject
195 - PyTypeObject
196 - PyThreadState
197 - PyInterpreterState
198 UseTab: Never