-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
106 lines (104 loc) · 2.94 KB
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
AccessModifierOffset: -4
AlignAfterOpenBracket: true
AlignConsecutiveAssignments: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: TopLevel
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerBinding: false
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PenaltyBreakComment: 60
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp03
TabWidth: 8
UseTab: Never
IncludeBlocks: Regroup
IncludeCategories:
# our config files are first:
- Regex: "(ibtk|ibamr)/config.h"
Priority: -1
# app_namespaces.h is always last:
- Regex: "(ibtk|ibamr)/app_namespaces.h"
Priority: 9999
# so is namespaces.h:
- Regex: "(ibtk|ibamr)/namespaces.h"
Priority: 10000
# then the library:
- Regex: "ibamr/.*\\.h.$"
Priority: 10
- Regex: "ibtk/.*\\.h.$"
Priority: 20
# silo has a limited number of headers so just hard-code it:
- Regex: "[<\"](ioperf\\.h|lite_pdb\\.h|lite_score\\.h|pmpio\\.h|silo_exports\\.h|silo\\.h)[\">]"
Priority: 700
# libMesh:
- Regex: "libmesh/"
Priority: 200
# PETSc:
- Regex: "[<\"]petsc[a-z]*\\.h[>\"]$"
Priority: 300
# HYPRE:
- Regex: "[<\"]HYPRE[a-z_]*\\.h[>\"]$"
Priority: 350
# other standardized headers:
- Regex: "<[A-Za-z_]*\\.h>"
Priority: 1000
# boost:
- Regex: "boost/"
Priority: 400
# eigen:
- Regex: "Eigen/"
Priority: 500
# muParser:
- Regex: "muParser"
Priority: 600
# standard library stuff
- Regex: "[\"<][a-z_]*[\">]"
Priority: 2000
# SAMRAI (which goes after IBAMR). This is last since we have headers that are
# not in a folder starting with the library's name:
- Regex: "[<\"][A-Z].*\\.h[>\"]$"
Priority: 100
- Regex: "[<\"]tbox/[A-Z].*\\.h[>\"]$"
Priority: 110
SortIncludes: true
# don't place the header corresponding to the source file first
IncludeIsMainRegex: "^$"