xref: /petsc/.clang-format (revision f13dfd9ea68e0ddeee984e65c377a1819eab8a8a)
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
102KeepEmptyLinesAtEOF: false
103LambdaBodyIndentation: Signature
104MacroBlockBegin: ''
105MacroBlockEnd:   ''
106MaxEmptyLinesToKeep: 1
107NamespaceIndentation: None
108PackConstructorInitializers: NextLine
109PenaltyBreakAssignment: 1000000
110PenaltyBreakBeforeFirstCallParameter: 1000000
111PenaltyBreakComment: 300000
112PenaltyBreakFirstLessLess: 120
113PenaltyBreakString: 1000
114PenaltyBreakTemplateDeclaration: 10
115PenaltyExcessCharacter: 0
116PenaltyReturnTypeOnItsOwnLine: 1000000
117PenaltyIndentedWhitespace: 0
118PointerAlignment: Right
119PPIndentWidth: -1
120ReferenceAlignment: Pointer
121ReflowComments: false
122ShortNamespaceLines: 0
123SortIncludes: Never
124SortUsingDeclarations: false
125SpaceAfterCStyleCast: false
126SpaceAfterLogicalNot: false
127SpaceAfterTemplateKeyword: true
128SpaceBeforeAssignmentOperators: true
129SpaceBeforeCaseColon: false
130SpaceBeforeCpp11BracedList: false
131SpaceBeforeCtorInitializerColon: true
132SpaceBeforeInheritanceColon: true
133SpaceBeforeParens: ControlStatementsExceptControlMacros
134SpaceAroundPointerQualifiers: Default
135SpaceBeforeRangeBasedForLoopColon: true
136SpaceInEmptyBlock: true
137SpaceInEmptyParentheses: false
138SpacesBeforeTrailingComments: 1
139SpacesInAngles: Never
140SpacesInConditionalStatement: false
141SpacesInContainerLiterals: true
142SpacesInCStyleCastParentheses: false
143SpacesInLineCommentPrefix:
144  Minimum: 1
145  Maximum: -1
146SpacesInParentheses: false
147SpacesInSquareBrackets: false
148SpaceBeforeSquareBrackets: false
149SeparateDefinitionBlocks: Leave
150BitFieldColonSpacing: Both
151Standard: Latest
152StatementAttributeLikeMacros:
153  - PETSC_EXTERN
154  - PETSC_INTERN
155  - PETSC_NODISCARD
156  - PETSC_DEPRECATED_FUNCTION
157  - PETSC_DEPRECATED_ENUM
158  - PETSC_DEPRECATED_TYPEDEF
159  - PETSC_DEPRECATED_MACRO
160StatementMacros:
161  - PetscKernel_A_gets_transpose_A_DECLARE
162  - PETSC_RETURNS
163  - PETSC_DECLTYPE_AUTO_RETURNS
164  - PETSC_NOEXCEPT_AUTO_RETURNS
165  - PETSC_DECLTYPE_NOEXCEPT_AUTO_RETURNS
166  - PETSC_UNUSED
167  - PetscPragmaOMP
168  - PetscPragmaSIMD
169  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_BEGIN
170  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_BEGIN_
171  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END
172  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END_
173  - _Pragma
174TabWidth: 2
175UseCRLF: false
176UseTab: Never
177WhitespaceSensitiveMacros:
178  - PetscStringize
179  - PetscStringize_
180  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_BEGIN
181  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_BEGIN_
182  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END
183  - PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END_
184  - _Pragma
185  - PETSC_DEPRECATED_IDENTIFIER
186  - PETSC_DEPRECATED_IDENTIFIER_
187  - PETSC_VALID_POINTER_IMPL_SPECIALIZATION
188  - _Generic
189  - PETSC_GENERIC_CV
190  - PetscMacroReturnStandard
191TypenameMacros:
192  - khash_t
193InsertNewlineAtEOF: true
194