-
Notifications
You must be signed in to change notification settings - Fork 192
/
.clang-format
69 lines (56 loc) · 1.67 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
Language: Cpp
Standard: Cpp11
ColumnLimit: 160
TabWidth: 4
IndentWidth: 4
UseTab: Never
# spaces settings
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeParens: ControlStatements # after if, while, for, but not function calls
#BreakConstructorInitializers: BeforeComma
# break before {, all the god damn time
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterStruct: true
AfterUnion: true
AfterControlStatement: true
BeforeElse: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
BeforeCatch: true
IndentBraces: false
# WISHLIST: set AccessModifierOffset to 4, and "inside class indent" to 8, so
# you could get:
# class X
# {
# public:
# int foo();
# };
# We settle for aligning the access modier with the braces here.
AccessModifierOffset: -4
# single line settings
#AllowShortFunctionsOnASingleLine: Inline
#AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
# Misc indentation settings
IndentCaseLabels: true
NamespaceIndentation: All
# use one line per param in huge function calls / definitions
BinPackArguments: false
BinPackParameters: false
# misc alignment settings
AlignAfterOpenBracket: Align
DerivePointerAlignment: false
PointerAlignment: Left
FixNamespaceComments: false
# WISHLIST: for all the below, an "allow" option, instead of just true or false
# This would preserve alignment if it's already aligned, but not force it if it
# wasn't. Without that option, the amount of false positives make these useless
#AlignConsecutiveAssignments
#AlignConsecutiveDeclarations
#AlignEscapedNewlines
#AlignTrailingComments