xref: /petsc/.clang-format (revision a4e35b1925eceef64945ea472b84f2bf06a67b5e)
1Language:        Cpp
2AccessModifierOffset: -2
3AlignAfterOpenBracket: Align
4AlignArrayOfStructures: Left
5AlignConsecutiveMacros: Consecutive
6AlignConsecutiveAssignments: Consecutive
7AlignConsecutiveBitFields: Consecutive
8AlignConsecutiveDeclarations: Consecutive
9AlignEscapedNewlines: DontAlign
10AlignOperands: AlignAfterOperator
11AlignTrailingComments:
12  Kind: Always
13  OverEmptyLines: 0
14AllowAllArgumentsOnNextLine: true
15AllowAllConstructorInitializersOnNextLine: true
16AllowAllParametersOfDeclarationOnNextLine: true
17AllowShortEnumsOnASingleLine: false
18AllowShortBlocksOnASingleLine: Always
19AllowShortCaseLabelsOnASingleLine: false
20AllowShortFunctionsOnASingleLine: Inline
21AllowShortLambdasOnASingleLine: All
22AllowShortIfStatementsOnASingleLine: AllIfsAndElse
23AllowShortLoopsOnASingleLine: true
24AlwaysBreakAfterDefinitionReturnType: None
25AlwaysBreakAfterReturnType: None
26AlwaysBreakBeforeMultilineStrings: false
27AlwaysBreakTemplateDeclarations: Yes
28AttributeMacros:
29  - __capability
30  - PETSC_EXTERN
31  - PETSC_INTERN
32  - PETSC_UNUSED
33  - PETSC_RESTRICT
34  - PETSC_SINGLE_LIBRARY_INTERN
35  - PETSC_ATTRIBUTE_FORMAT
36  - PETSC_ATTRIBUTE_MPI_TYPE_TAG
37  - PETSC_ATTRIBUTE_MPI_POINTER_WITH_TYPE
38  - PETSC_ATTRIBUTE_MPI_TYPE_TAG_LAYOUT_COMPATIBLE
39  - PETSC_ATTRIBUTE_COLD
40BinPackArguments: true
41BinPackParameters: true
42BreakBeforeBraces: Custom
43BraceWrapping:
44  AfterCaseLabel:  false
45  AfterClass:      false
46  AfterControlStatement: Never
47  AfterEnum:       false
48  AfterFunction:   true
49  AfterNamespace:  true
50  AfterObjCDeclaration: false
51  AfterStruct:     false
52  AfterUnion:      true
53  AfterExternBlock: false
54  BeforeCatch:     false
55  BeforeElse:      false
56  BeforeLambdaBody: false
57  BeforeWhile:     false
58  IndentBraces:    false
59  SplitEmptyFunction: true
60  SplitEmptyRecord: false
61  SplitEmptyNamespace: true
62BreakBeforeBinaryOperators: None
63# BreakBeforeConceptDeclarations: Allowed
64BreakBeforeInheritanceComma: false
65BreakInheritanceList: AfterColon
66BreakBeforeTernaryOperators: true
67BreakConstructorInitializersBeforeComma: false
68BreakConstructorInitializers: AfterColon
69BreakAfterJavaFieldAnnotations: false
70BreakStringLiterals: true
71ColumnLimit: 250
72CompactNamespaces: false
73ConstructorInitializerAllOnOneLineOrOnePerLine: false
74ConstructorInitializerIndentWidth: 2
75ContinuationIndentWidth: 2
76Cpp11BracedListStyle: true
77DeriveLineEnding: true
78DerivePointerAlignment: false
79DisableFormat: false
80EmptyLineAfterAccessModifier: Never
81EmptyLineBeforeAccessModifier: LogicalBlock
82ExperimentalAutoDetectBinPacking: false
83FixNamespaceComments: true
84ForEachMacros:
85#  - BOOST_FOREACH
86IfMacros:
87  #- PetscCheck
88  #- PetscAssert
89IncludeBlocks: Preserve
90IncludeIsMainSourceRegex: ''
91IndentAccessModifiers: false
92IndentCaseLabels: false
93IndentCaseBlocks: false
94IndentGotoLabels: true
95IndentPPDirectives: BeforeHash
96IndentExternBlock: NoIndent
97IndentRequires: false
98IndentWidth: 2
99IndentWrappedFunctionNames: false
100InsertTrailingCommas: None
101KeepEmptyLinesAtTheStartOfBlocks: false
102LambdaBodyIndentation: Signature
103MacroBlockBegin: ''
104MacroBlockEnd:   ''
105MaxEmptyLinesToKeep: 1
106NamespaceIndentation: None
107PackConstructorInitializers: NextLine
108PenaltyBreakAssignment: 1000000
109PenaltyBreakBeforeFirstCallParameter: 1000000
110PenaltyBreakComment: 300000
111PenaltyBreakFirstLessLess: 120
112PenaltyBreakString: 1000
113PenaltyBreakTemplateDeclaration: 10
114PenaltyExcessCharacter: 0
115PenaltyReturnTypeOnItsOwnLine: 1000000
116PenaltyIndentedWhitespace: 0
117PointerAlignment: Right
118PPIndentWidth: -1
119ReferenceAlignment: Pointer
120ReflowComments: false
121ShortNamespaceLines: 0
122SortIncludes: Never
123SortUsingDeclarations: false
124SpaceAfterCStyleCast: false
125SpaceAfterLogicalNot: false
126SpaceAfterTemplateKeyword: true
127SpaceBeforeAssignmentOperators: true
128SpaceBeforeCaseColon: false
129SpaceBeforeCpp11BracedList: false
130SpaceBeforeCtorInitializerColon: true
131SpaceBeforeInheritanceColon: true
132SpaceBeforeParens: ControlStatementsExceptControlMacros
133SpaceAroundPointerQualifiers: Default
134SpaceBeforeRangeBasedForLoopColon: true
135SpaceInEmptyBlock: true
136SpaceInEmptyParentheses: false
137SpacesBeforeTrailingComments: 1
138SpacesInAngles: Never
139SpacesInConditionalStatement: false
140SpacesInContainerLiterals: true
141SpacesInCStyleCastParentheses: false
142SpacesInLineCommentPrefix:
143  Minimum: 1
144  Maximum: -1
145SpacesInParentheses: false
146SpacesInSquareBrackets: false
147SpaceBeforeSquareBrackets: false
148SeparateDefinitionBlocks: Leave
149BitFieldColonSpacing: Both
150Standard: Latest
151StatementAttributeLikeMacros:
152  - PETSC_EXTERN
153  - PETSC_INTERN
154  - PETSC_NODISCARD
155  - PETSC_DEPRECATED_FUNCTION
156  - PETSC_DEPRECATED_ENUM
157  - PETSC_DEPRECATED_TYPEDEF
158  - PETSC_DEPRECATED_MACRO
159StatementMacros:
160  - PetscKernel_A_gets_transpose_A_DECLARE
161  - PETSC_RETURNS
162  - PETSC_DECLTYPE_AUTO_RETURNS
163  - PETSC_NOEXCEPT_AUTO_RETURNS
164  - PETSC_DECLTYPE_NOEXCEPT_AUTO_RETURNS
165  - PETSC_UNUSED
166  - PetscPragmaOMP
167  - PetscPragmaSIMD
168  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_BEGIN
169  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_BEGIN_
170  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END
171  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END_
172  - _Pragma
173TabWidth: 2
174UseCRLF: false
175UseTab: Never
176WhitespaceSensitiveMacros:
177  - PetscStringize
178  - PetscStringize_
179  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_BEGIN
180  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_BEGIN_
181  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END
182  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END_
183  - _Pragma
184  - PETSC_DEPRECATED_IDENTIFIER
185  - PETSC_DEPRECATED_IDENTIFIER_
186  - PETSC_VALID_POINTER_IMPL_SPECIALIZATION
187  - _Generic
188  - PETSC_GENERIC_CV
189TypenameMacros:
190  - khash_t
191InsertNewlineAtEOF: true
192