-
Notifications
You must be signed in to change notification settings - Fork 35
/
.clang-format
39 lines (39 loc) · 1.41 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
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: WebKit
ColumnLimit: 80
AlignTrailingComments: true
FixNamespaceComments: true
ReflowComments: true
BinPackParameters: false
AllowAllParametersOfDeclarationOnNextLine: true
AlignAfterOpenBracket: AlwaysBreak
BreakBeforeBinaryOperators: NonAssignment
SortIncludes: true
CommentPragmas: '^@.+'
BreakStringLiterals: false
PackConstructorInitializers: CurrentLine
# Regroup includes with a priority system
IncludeBlocks: Regroup
IncludeCategories:
# by default, the main header of a cpp will get priority 0
# regex here are sorted by search pattern, not by sort priority
- Regex: "^<ipc\/[^/]*>" # this libraries
Priority: 2 # internal library group
SortPriority: 2
CaseSensitive: true
- Regex: "^<ipc\/.*\/.*>" # this libraries
Priority: 2 # internal library group
SortPriority: 3
CaseSensitive: true
- Regex: "^<(.*\\.h[px]*)|(Eigen\/.*)>"
Priority: 4 # libraries (because they end in .h)
SortPriority: 4
CaseSensitive: false
- Regex: "^<.*"
Priority: 5 # system (without .h, because that is captured by the other group)
SortPriority: 5
CaseSensitive: false
- Regex: ".*" # catch-all for internal files
Priority: 1 # internal file group
SortPriority: 1
CaseSensitive: true