-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clang-format
More file actions
61 lines (51 loc) · 1.82 KB
/
Copy path.clang-format
File metadata and controls
61 lines (51 loc) · 1.82 KB
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
# Indentation
ColumnLimit: 0
UseTab: Never
IndentWidth: 4
ContinuationIndentWidth: 4
AccessModifierOffset: -4
# Comments
FixNamespaceComments: true
# Breaks and lines
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBraces: Attach
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
KeepEmptyLinesAtTheStartOfBlocks: true
# Spacing
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
# Includes
SortIncludes: true
IncludeBlocks: Regroup
IncludeCategories: # The corresponding header of a .cpp-file gets priority 0
- Regex: '<boost/test' # make sure Boost/test headers are always included first
Priority: -1
- Regex: '<boost' # Boost headers
Priority: 2
- Regex: '<(Eigen|unsupported/Eigen)' # Eigen headers
Priority: 3
- Regex: '<(algorithm|array|cmath|chrono|complex|cstddef|cstdlib|deque|fstream|functional|initializer_list|iomanip|iostream|iterator|map|memory|numeric|ostream|queue|sstream|string|type_traits|unordered_map|utility|vector)' # STL headers
Priority: 5
- Regex: '<' # any other system-installed headers are grouped and should appear just before the STL headers
Priority: 4
- Regex: '<libint2' # libint2 always goes last
Priority: 6
- Regex: '.' # all files that aren't included in one of the previous categories are considered to be project sources and appear first
Priority: 1
# General
MaxEmptyLinesToKeep: 2
PointerAlignment: Left