xref: /petsc/.clang-format (revision daa037dfd3c3bec8dc8659548d2b20b07c1dc6de)
1---
2Language:        Cpp
3# BasedOnStyle:  LLVM
4AccessModifierOffset: -2
5AlignAfterOpenBracket: Align
6AlignArrayOfStructures: Right
7AlignConsecutiveMacros: Consecutive
8AlignConsecutiveAssignments: AcrossComments
9AlignConsecutiveBitFields: AcrossComments
10AlignConsecutiveDeclarations: AcrossComments
11AlignEscapedNewlines: Right
12AlignOperands: DontAlign
13AlignTrailingComments: false
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: MultiLine
28AttributeMacros:
29  - PETSC_EXTERN
30  - PETSC_INTERN
31  - PETSC_UNUSED
32BinPackArguments: true
33BinPackParameters: true
34BreakBeforeBraces: Custom
35BraceWrapping:
36  AfterCaseLabel:  false
37  AfterClass:      false
38  AfterControlStatement: Never
39  AfterEnum:       true
40  AfterFunction:   true
41  AfterNamespace:  true
42  AfterObjCDeclaration: false
43  AfterStruct:     true
44  AfterUnion:      true
45  AfterExternBlock: true
46  BeforeCatch:     false
47  BeforeElse:      false
48  BeforeLambdaBody: false
49  BeforeWhile:     false
50  IndentBraces:    false
51  SplitEmptyFunction: true
52  SplitEmptyRecord: true
53  SplitEmptyNamespace: true
54BreakBeforeBinaryOperators: None
55# BreakBeforeConceptDeclarations: Allowed
56BreakBeforeInheritanceComma: false
57BreakInheritanceList: AfterColon
58BreakBeforeTernaryOperators: true
59BreakConstructorInitializersBeforeComma: false
60BreakConstructorInitializers: AfterColon
61BreakAfterJavaFieldAnnotations: false
62BreakStringLiterals: true
63ColumnLimit: 250
64CompactNamespaces: false
65ConstructorInitializerAllOnOneLineOrOnePerLine: false
66ConstructorInitializerIndentWidth: 2
67ContinuationIndentWidth: 2
68Cpp11BracedListStyle: true
69DeriveLineEnding: true
70DerivePointerAlignment: false
71DisableFormat: false
72EmptyLineAfterAccessModifier: Never
73EmptyLineBeforeAccessModifier: LogicalBlock
74ExperimentalAutoDetectBinPacking: false
75FixNamespaceComments: true
76ForEachMacros:
77  - foreach
78  - Q_FOREACH
79  - BOOST_FOREACH
80IfMacros:
81  - KJ_IF_MAYBE
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
100# PackConstructorInitializers: NextLine
101PenaltyBreakAssignment: 1000000
102PenaltyBreakBeforeFirstCallParameter: 1000000
103PenaltyBreakComment: 300
104PenaltyBreakFirstLessLess: 120
105PenaltyBreakString: 1000
106PenaltyBreakTemplateDeclaration: 10
107PenaltyExcessCharacter: 1000000000
108PenaltyReturnTypeOnItsOwnLine: 1000000000
109PenaltyIndentedWhitespace: 0
110PointerAlignment: Right
111PPIndentWidth: -1
112ReferenceAlignment: Pointer
113ReflowComments: true
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
141BitFieldColonSpacing: Both
142Standard: Latest
143StatementAttributeLikeMacros:
144  - PETSC_EXTERN
145  - PETSC_INTERN
146StatementMacros:
147  - PETSC_UNUSED
148  - QT_REQUIRE_VERSION
149TabWidth: 2
150UseCRLF: false
151UseTab: Never
152WhitespaceSensitiveMacros:
153  - PetscStringize
154  - PetscStringize_
155