-
Notifications
You must be signed in to change notification settings - Fork 61
/
.clang-format
76 lines (67 loc) · 1.81 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
BasedOnStyle: LLVM
IndentWidth: 3
UseTab: Never
ColumnLimit: 120
---
Language: Cpp
# always align * and & to the type
DerivePointerAlignment: false
PointerAlignment: Left
# regroup includes to these classes
IncludeCategories:
- Regex: '(<|"(eosio)/)'
Priority: 4
- Regex: '(<|"(boost)/)'
Priority: 3
- Regex: '(<|"(llvm|llvm-c|clang|clang-c)/'
Priority: 3
- Regex: '<[[:alnum:]]+>'
Priority: 2
- Regex: '.*'
Priority: 1
#IncludeBlocks: Regroup
# set indent for public, private and protected
#AccessModifierOffset: 3
# make line continuations twice the normal indent
ContinuationIndentWidth: 6
# add missing namespace comments
FixNamespaceComments: true
# add spaces to braced list i.e. int* foo = { 0, 1, 2 }; instead of int* foo = {0,1,2};
Cpp11BracedListStyle: false
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignOperands: true
AlignTrailingComments: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortBlocksOnASingleLine: true
#AllowShortIfStatementsOnASingleLine: WithoutElse
#AllowShortIfStatementsOnASingleLine: true
#AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakTemplateDeclarations: true
BinPackParameters: true
### use this with clang9
BreakBeforeBraces: Custom
BraceWrapping:
#AfterCaseLabel: true
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BreakConstructorInitializers: BeforeColon
CompactNamespaces: true
IndentCaseLabels: true
IndentPPDirectives: AfterHash
NamespaceIndentation: Inner
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
---