-
Notifications
You must be signed in to change notification settings - Fork 161
/
.clang-format
93 lines (73 loc) · 2.05 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
82
83
84
85
86
87
88
89
90
91
92
93
# This format file is made especially for clang-format-9
---
BasedOnStyle: Google
IndentWidth: 4
ColumnLimit: 160
---
Language: Cpp
Standard: Cpp11
# Don't fuck with my includes
SortIncludes: false
# Don't fuck with my using declarations either
SortUsingDeclarations: false
# Tune some indentations
AccessModifierOffset: -4
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
# General Space Configuration
SpaceBeforeParens: ControlStatements
SpaceBeforeAssignmentOperators: true
SpaceAfterTemplateKeyword: true
SpaceAfterCStyleCast: true
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
# No block and its body should EVER be on a single line
AllowShortFunctionsOnASingleLine: Empty
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
# Functions
IndentWrappedFunctionNames: false
AlwaysBreakAfterReturnType: None
BreakConstructorInitializers: AfterColon
# Switch
IndentCaseLabels: false
# Better C++11 support
Cpp11BracedListStyle: true
# Avoid too many empty lines
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: false
# Templates should always be on a separate line
AlwaysBreakTemplateDeclarations: true
# Nice alignement
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignOperands: true
AlignAfterOpenBracket: Align
BinPackParameters: false
BinPackArguments: false
# Improve ternary operators alignement
BreakBeforeTernaryOperators: true
BreakBeforeBinaryOperators: NonAssignment
# Tabs are bad news
UseTab: Never
# Configure comments
AlignTrailingComments: true
SpacesBeforeTrailingComments: 1
# Avoid empty lines
KeepEmptyLinesAtTheStartOfBlocks: false
# Force pointers to the type
DerivePointerAlignment: false
PointerAlignment: Middle
ReferenceAlignment: Middle
# Strings
BreakStringLiterals: false
# Namespaces
NamespaceIndentation: None
CompactNamespaces: false
FixNamespaceComments: true