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