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