-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.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
BasedOnStyle: Microsoft
Standard: Latest
IndentWidth: 4
AccessModifierOffset: -4
AlwaysBreakTemplateDeclarations: Yes
AlignAfterOpenBracket: true
IndentCaseLabels: true
AlignConsecutiveMacros: AcrossComments
AlignEscapedNewlines: Left
AlignTrailingComments: true
AllowAllConstructorInitializersOnNextLine: true
SortIncludes: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
DerivePointerAlignment: true
PointerAlignment: Right
ColumnLimit: 100
ForEachMacros: ['list_for_every','list_for_every_safe','list_for_every_rcu','mt_for_each','list_for_each_entry',
'list_for_each_entry_safe', 'list_for_each_entry_rcu']
IncludeBlocks: Regroup
IndentExternBlock: NoIndent
IncludeCategories:
# C Header: <foo.h>, <net/foo.h>, etc
- Regex: '^[a-zA-Z0-9_/\.-]+\.h|[a-zA-Z0-9_-]+\.h)>)'
Priority: 1
- Regex: '^(<((lib/|arpa/|net/|netinet/|sys/)[a-zA-Z0-9_/\.-]+\.h|[a-zA-Z0-9_-]+\.h)>)'
Priority: 2
# Cpp Header: <foo> and <experimental/foo>
- Regex: '^(<(experimental/)*[a-zA-Z0-9_-]+>)'
Priority: 3
- Regex: '^(<((onyx/)[a-zA-Z0-9_/\.-]+\.h|[a-zA-Z0-9_-]+\.h*)>)'
Priority: 4
# Libraries: <foo/bar.h>
- Regex: '^(<[a-zA-Z0-9_/-]+\.h*>)'
Priority: 5
# Local headers: "foo/bar.h"
- Regex: '^("[.a-zA-Z0-9_/-]+\.h*")'
Priority: 6
SpaceAfterCStyleCast: True