-
Notifications
You must be signed in to change notification settings - Fork 412
/
.clang-format
122 lines (86 loc) · 3.16 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Language: Cpp
# Access modifiers in the middle
AccessModifierOffset: -2
# Align escaped newlines as far left as possible
AlignEscapedNewlinesLeft: true
# Align all trailing comments
AlignTrailingComments: true
# Don't allow parameters to be placed on the next line, even though BinPackParameters is false
AllowAllParametersOfDeclarationOnNextLine: false
# Do not allow short functions/if statements/loops on a single line
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
# Don't force breaks before multiline strings
AlwaysBreakBeforeMultilineStrings: false
# Don't force breaks before template declarations
AlwaysBreakTemplateDeclarations: false
# Force breaks after definition return type
AlwaysBreakAfterDefinitionReturnType: true
# Arguments and parameters are either on one line or on one line each
BinPackArguments: false
BinPackParameters: false
# Do not break before binary operators
BreakBeforeBinaryOperators: None
# Use the linux brace breaking style: Attach braces to context except for braces on functions,
# namespaces and class definitions
BreakBeforeBraces: Linux
# Do not place ternary operators after line breaks
BreakBeforeTernaryOperators: false
# In the constructor initializers do not align the comma with the colon
BreakConstructorInitializersBeforeComma: false
# Force columns to be less than 100 characters
ColumnLimit: 100
# Constructor initializer all in one line or all on their own line
ConstructorInitializerAllOnOneLineOrOnePerLine: true
# Indent constructor initializers
ConstructorInitializerIndentWidth: 8
# Do not indent continuations
ContinuationIndentWidth: 0
# Do not use braced lists in c++11 style
Cpp11BracedListStyle: false
# Do not derive pointer alignment
DerivePointerAlignment: false
# Case labes are indented
IndentCaseLabels: true
# Do not indent function declarations
IndentFunctionDeclarationAfterType: false
# Indentation is 4 characters
IndentWidth: 4
# Do not keep empty lines at start of blocks
KeepEmptyLinesAtTheStartOfBlocks: false
# Keep at most 2 consecutive empty lines
MaxEmptyLinesToKeep: 2
# Do not indent namespaces
NamespaceIndentation: None
# Spaces for ObjC properties and protocol lists
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
# Penalties
PenaltyBreakBeforeFirstCallParameter: 100
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 100
PenaltyExcessCharacter: 20
PenaltyReturnTypeOnItsOwnLine: 20
# Force pointers to typename (i.e. char* a instead of char *a)
PointerAlignment: Left
# Spaces after C-style casts and before assignments
SpaceAfterCStyleCast: true
SpaceBeforeAssignmentOperators: true
# Only space before parentheses if they are control statements
SpaceBeforeParens: ControlStatements
# Single space before trailing comments
SpacesBeforeTrailingComments: 1
# No spaces in parentheses, angles, or square brackets
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
# Use c++11 as the language standard
Standard: Cpp11
# Tabs are 4 characters wide
TabWidth: 4
# Don't use tabs for indentation :-(
UseTab: Never