-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.clang-format
81 lines (67 loc) · 1.72 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
# See Clang docs: http://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Chromium
Standard: Latest
ColumnLimit: 120
MaxEmptyLinesToKeep: 1
# Indent
IndentWidth: 4
UseTab: Never
IndentCaseLabels: false
# Include
SortIncludes: false
IncludeBlocks: Preserve
# Preprocessor
IndentPPDirectives: BeforeHash
# Braces
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
# Keeps extern "C" blocks unindented.
AfterExternBlock: false
# Left-align pointers and references
PointerAlignment: Left
# Align
AlignOperands: true
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: true
PadOperators: true
AlignEscapedNewlines: Left
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AlignAfterOpenBracket: AlwaysBreak
# Single line
AllowShortBlocksOnASingleLine: Empty
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortCaseLabelsOnASingleLine: false
AlwaysBreakTemplateDeclarations: Yes
# Arguments
BinPackArguments: false
BinPackParameters: false
PackConstructorInitializers: BinPack
# Access modifier
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
AccessModifierOffset: -4
# Useful for spacing out functions in classes
KeepEmptyLinesAtTheStartOfBlocks: true