-
Notifications
You must be signed in to change notification settings - Fork 23
/
.clang-format
70 lines (60 loc) · 1.98 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
DisableFormat: false
#Some settings are unavailable but should be already taken care of
Language: Cpp
Standard: Cpp11
MaxEmptyLinesToKeep: 1
ColumnLimit: 120 #should between 80-120 so it'll be easier to see diffs
UseTab: Never
IndentWidth: 4
SortIncludes: true
IncludeBlocks: Preserve #Sorts includes separately
SortUsingDeclarations: true
CompactNamespaces: false #Puts em all on the same line
FixNamespaceComments: true
NamespaceIndentation: None
AlignAfterOpenBracket: true
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AlignConsecutiveAssignments: false
IndentCaseLabels: true
AllowShortCaseLabelsOnASingleLine: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackParameters: true #two params per-line if too long
BreakBeforeBinaryOperators: None #so assignment alignments don't get messed up
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterEnum: true
AfterStruct: true
AfterControlStatement: true
AfterNamespace: false
AfterFunction: true
BeforeElse: true
SplitEmptyFunction: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
ConstructorInitializerAllOnOneLineOrOnePerLine: true
DerivePointerAlignment: true #Tries to stay consistent with existing code
ExperimentalAutoDetectBinPacking: true
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: false
PointerAlignment: Left
ReflowComments: true
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInParentheses: false
SpacesInCStyleCastParentheses: false
SpacesInSquareBrackets: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
IndentAccessModifiers: false
AccessModifierOffset: -4