-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.clang-format
67 lines (50 loc) · 1.8 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
################################################################################
# #
# Clang Format Configuration #
# #
################################################################################
---
# Start out with LLVM's format
BasedOnStyle: LLVM
IndentWidth: 4 # Indent with 4
UseTab: Never # spaces.
# The endless debate about brace wrapping ends here. Basically, wrap everything
# except namespaces and don't indent the braces themselves.
BreakBeforeBraces: Custom
BraceWrapping:
# Wrap class definitions.
AfterClass: true
# Wrap control statements (if/for/while/switch/..).
AfterControlStatement: true
# Wrap enum definitions.
AfterEnum: true
# Wrap function definitions.
AfterFunction: true
# Don't wrap namespace definitions.
AfterNamespace: false
# Wrap ObjC definitions (@autoreleasepool, interfaces, ..).
AfterObjCDeclaration: true
# Wrap struct definitions.
AfterStruct: true
# Wrap union definitions.
AfterUnion: true
# Wrap before catch.
BeforeCatch: true
# Wrap before else.
BeforeElse: true
# Don't indent the wrapped braces themselves.
IndentBraces: false
# Allow more compact code.
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
# Pointers are part of the type, so align them to the type.
DerivePointerAlignment: false
PointerAlignment: Left
# Alignment of consecutive decls and operands for readability.
# Don't align consecutive assignments.
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: true
AlignOperands: true
...