-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
179 lines (133 loc) · 5.09 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
Language: Cpp
# Aligns parameters contained within open brackets
# .e.g longFunction (argument1,
# argument2)
#AlignAfterOpenBracket: AlwaysBreak
# Aligns the assignment operators
#AlignConsecutiveAssignments: true
# Aligns the variable names
#AlignConsecutiveDeclarations: true
# Aligns operands that need to be split over multiple lines
#AlignOperands: true
# Align comments
#AlignTrailingComments: true
# if function declaration doesn't fit on a line, put all params
# of function dec. onto next line. Overrides BinPackParameters option
# void myFunc(
# int a, int b, int c, int d, int e);
#AllowAllParametersOfDeclarationOnNextLine: false
# Allows braced statements to be on a single line
# e.g. if (eval) { return true; }
#AllowShortBlocksOnASingleLine: Never
# only merge functions defined inside a class, including empty ones
# Other options include "empty" where onyl empty functions are inline
# "InlineOnly" which excludes empty functions and "All" which merges
# all functions fitting on a single line
#AllowShortFunctionsOnASingleLine: Inline
# single line conditionals can be put on a single line
# if (a) operation;
# vs.
# if (a)
# operation;
#AllowShortIfStatementsOnASingleLine: false
# self-explanatory.
#AllowShortCaseLabelsOnASingleLine: false
# self-explanatory. for(;;) operation;
#AllowShortLoopsOnASingleLine: false
# break long strings into multiple lines and then align the strings
#AlwaysBreakBeforeMultilineStrings: false
# Forces the params and names following the template decl. to
# break into multiline
# e.g.
# template <typename T>
# T foo (int a, int b)
#AlwaysBreakTemplateDeclarations: No
# if false, a function call's arguments get their own lines
#BinPackArguments: true
# if false, a function declaration's args get their own lines
#BinPackParameters: false
# forces the operator to be the end of line and the second monomial
# term to a new line
# e.g. val = a +
# b /
# c;
#BreakBeforeBinaryOperators: None
# forces each operand to a new line
#BreakBeforeTernaryOperators: true
#BreakBeforeBraces: Allman
# self-explanatory
ColumnLimit: 120
# stop clang from trying to format the special
# Cube-generated starting and ending comments
#CommentPragmas: '^( ###(\#+))'
# Either fits all the constructor call args onto one line
# or each param gets their own line if they don't fit
#ConstructorInitializerAllOnOneLineOrOnePerLine: true
# number of char to use for indentation of contructor initializer lists
# class::construct() : \noOfChars a(a), \noOfChars b(b) {};
#ConstructorInitializerIndentWidth: 2
# indent width length for line continuations
# int i =
# \noOfChars function(
# 2*\noOfChars arg);
#ContinuationIndentWidth: 4
# Format braced lists as best suited for C++11 braced lists
# Important Differences (if true)
# - no spaces inside the braced lists
# - no line break before closing brace
# - indentation with the continuation indentation, not with block indent
#Cpp11BracedListStyle: false
# "case" keywords are indented from the "switch"
#IndentCaseLabels: true
# self-explanatory
#IndentWidth: 4
# indent if function def or declaration is wrapped after the type
# e.g.
# stupidlyLongReturnType
# stupidlyLongFunctionDeclaration();
#IndentWrappedFunctionNames: true
# empty line at start of new scope is kept
#KeepEmptyLinesAtTheStartOfBlocks: false
# Changed this. Made it C specific. Should also be left aligned.
# "Left" : Leave the pointer character in a variable declaration to the left (e.g. int* a)
# "Right" : Align pointer to right (e.g. int *a)
# "Middle" : Align pointer between type and var name (e.g. int * a)
PointerAlignment: Left
# if "None", no namespaces are indented
# if "Inner", only inner namespaces are indented
# if "All", every new scope is indented (intuitive)
#NamespaceIndentation: Inner
# splits long comments into multiline
#ReflowComments: true
# lists of the include headers in alphabetical order
#SortIncludes: CaseSensitive
# TODO: Enable me when clang-format has been updated to understand me
#SortUsingDeclarations: false
# inserts a space between casts and the variables they're targeting
#SpaceAfterCStyleCast: false
# TODO: Enable me when clang-format has been updated to understand me
#SpaceAfterTemplateKeyword: false
# self-explanatory
#SpaceBeforeAssignmentOperators: true
# "Never" : don't put a space before opening parantheses
# "ControlStatements" : only put space before parantheses belonging to ctrl statements
# "Always" : always put a space before opening params
#SpaceBeforeParens: ControlStatements
# self-explanatory
#SpaceInEmptyParentheses: false
# number of spaces before c-style comments "//"
#SpacesBeforeTrailingComments: 1
# spaces inserted after < and before > in template argument lists
#SpacesInAngles: false
# Spaces in parantheses for casting e.g. ( int )
#SpacesInCStyleCastParentheses: false
# Spaces inserted between array brackets
#SpacesInContainerLiterals: false
# self-explanatory
#SpacesInParentheses: false
# self-explanatory
#SpacesInSquareBrackets: false
# self-explanatory
TabWidth: 4
# self-explanatory
UseTab: ForIndentation