rubyfb 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +11 -0
- data/Manifest +3 -0
- data/Rakefile +1 -1
- data/ext/Blob.c +10 -7
- data/ext/Blob.h +4 -2
- data/ext/Connection.c +4 -23
- data/ext/ResultSet.c +1 -1
- data/ext/Statement.c +34 -0
- data/ext/Statement.h +1 -0
- data/ext/Transaction.c +1 -19
- data/ext/TypeMap.c +35 -29
- data/ext/TypeMap.h +0 -1
- data/ext/uncrustify.cfg +1298 -0
- data/lib/Connection.rb +25 -0
- data/lib/active_record/connection_adapters/rubyfb_adapter.rb +5 -1
- data/lib/arel/visitors/rubyfb_15compat.rb +25 -0
- data/lib/rubyfb.rb +1 -0
- data/lib/rubyfb_lib.so +0 -0
- data/lib/rubyfb_options.rb +51 -0
- data/rubyfb.gemspec +4 -4
- data/test/AddRemoveUserTest.rb +1 -2
- data/test/BackupRestoreTest.rb +22 -22
- data/test/BlobTest.rb +2 -3
- data/test/CharacterSetTest.rb +46 -51
- data/test/ConnectionTest.rb +1 -2
- data/test/DDLTest.rb +1 -2
- data/test/DatabaseTest.rb +2 -3
- data/test/GeneratorTest.rb +1 -2
- data/test/KeyTest.rb +1 -2
- data/test/ResultSetTest.rb +14 -2
- data/test/RoleTest.rb +1 -2
- data/test/RowCountTest.rb +1 -2
- data/test/RowTest.rb +1 -2
- data/test/SQLTest.rb +1 -2
- data/test/SQLTypeTest.rb +1 -2
- data/test/StatementTest.rb +1 -2
- data/test/TestSetup.rb +2 -0
- data/test/TransactionTest.rb +1 -2
- data/test/TypeTest.rb +1 -2
- metadata +8 -4
data/CHANGELOG
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
v0.5.8 ==
|
2
|
+
Merge duplicated code in transaction.execute() and connection.execute()
|
3
|
+
Make #fetch() *always* return nil if #exhausted? - pilcrow/look-before-you-leap
|
4
|
+
Add Fb1.5 compatible arel adapter - at least to some extent
|
5
|
+
Some words of caution here - the Fb1.5 arel implementation will yield WRONG results with union selects
|
6
|
+
The Fb15 compatibility mode is turned on by setting Rubyfb::Options.fb15_compat = true in your initialization code
|
7
|
+
Pipe up field encoding into Ruby 1.9 strings - fix github issue #3
|
8
|
+
The mapping table from firebird to ruby character set names contains some common character sets,
|
9
|
+
but is far from complete. The mapping table can be extended/altered in your initializers like this:
|
10
|
+
Rubyfb::Options.charset_name_map['FIREBIRD_CHARSET_NAME']='RUBY_CHARSET_NAME'
|
11
|
+
|
1
12
|
v0.5.7 ==
|
2
13
|
arel-2.0.7 compatibility - use node.expr for limit/offset clauses
|
3
14
|
activesupport-3.0.3+ compatibility require_library_or_gem location changed
|
data/Manifest
CHANGED
@@ -45,14 +45,17 @@ ext/TypeMap.h
|
|
45
45
|
ext/extconf.rb
|
46
46
|
ext/rfbint.h
|
47
47
|
ext/rfbsleep.h
|
48
|
+
ext/uncrustify.cfg
|
48
49
|
lib/Connection.rb
|
49
50
|
lib/ProcedureCall.rb
|
50
51
|
lib/SQLType.rb
|
51
52
|
lib/active_record/connection_adapters/rubyfb_adapter.rb
|
52
53
|
lib/arel/visitors/rubyfb.rb
|
54
|
+
lib/arel/visitors/rubyfb_15compat.rb
|
53
55
|
lib/mkdoc
|
54
56
|
lib/rubyfb.rb
|
55
57
|
lib/rubyfb_lib.so
|
58
|
+
lib/rubyfb_options.rb
|
56
59
|
lib/src.rb
|
57
60
|
mswin32fb/fbclient_mingw.def
|
58
61
|
mswin32fb/fbclient_mingw.lib
|
data/Rakefile
CHANGED
data/ext/Blob.c
CHANGED
@@ -179,10 +179,8 @@ static VALUE eachBlobSegment(VALUE self) {
|
|
179
179
|
* @param table The name of the table containing the blob being opened.
|
180
180
|
* @param column The name of the column in the table that contains the
|
181
181
|
* blob.
|
182
|
-
* @param connection
|
183
|
-
*
|
184
|
-
* @param transaction A pointer to the transaction to be used in accessing
|
185
|
-
* the blob.
|
182
|
+
* @param connection The connection to be used in accessing the blob.
|
183
|
+
* @param transaction The transaction to be used in accessing the blob.
|
186
184
|
*
|
187
185
|
* @return A pointer to an allocated and opened BlobHandle structure.
|
188
186
|
*
|
@@ -190,8 +188,13 @@ static VALUE eachBlobSegment(VALUE self) {
|
|
190
188
|
BlobHandle *openBlob(ISC_QUAD blobId,
|
191
189
|
char *table,
|
192
190
|
char *column,
|
193
|
-
|
194
|
-
|
191
|
+
VALUE connection,
|
192
|
+
VALUE transaction) {
|
193
|
+
ConnectionHandle *cHandle = NULL;
|
194
|
+
TransactionHandle *tHandle = NULL;
|
195
|
+
Data_Get_Struct(connection, ConnectionHandle, cHandle);
|
196
|
+
Data_Get_Struct(transaction, TransactionHandle, tHandle);
|
197
|
+
|
195
198
|
BlobHandle *blob = ALLOC(BlobHandle);
|
196
199
|
|
197
200
|
if(blob != NULL) {
|
@@ -202,7 +205,7 @@ BlobHandle *openBlob(ISC_QUAD blobId,
|
|
202
205
|
isc_blob_default_desc(&blob->description,
|
203
206
|
(unsigned char *)table,
|
204
207
|
(unsigned char *)column);
|
205
|
-
if(isc_open_blob2(status,
|
208
|
+
if(isc_open_blob2(status, &cHandle->handle, &tHandle->handle, &blob->handle, &blobId,
|
206
209
|
0, NULL) == 0) {
|
207
210
|
char items[] = {isc_info_blob_num_segments,
|
208
211
|
isc_info_blob_total_length},
|
data/ext/Blob.h
CHANGED
@@ -39,6 +39,8 @@
|
|
39
39
|
#include "ruby.h"
|
40
40
|
#define RUBY_H_INCLUDED
|
41
41
|
#endif
|
42
|
+
#include "Connection.h"
|
43
|
+
#include "Transaction.h"
|
42
44
|
|
43
45
|
/* Type definitions. */
|
44
46
|
typedef struct {
|
@@ -55,8 +57,8 @@ extern VALUE cBlob;
|
|
55
57
|
BlobHandle *openBlob(ISC_QUAD,
|
56
58
|
char *,
|
57
59
|
char *,
|
58
|
-
|
59
|
-
|
60
|
+
VALUE,
|
61
|
+
VALUE);
|
60
62
|
void Init_Blob(VALUE);
|
61
63
|
void blobFree(void *);
|
62
64
|
VALUE initializeBlob(VALUE);
|
data/ext/Connection.c
CHANGED
@@ -143,7 +143,8 @@ static VALUE initializeConnection(int argc, VALUE *argv, VALUE self) {
|
|
143
143
|
rb_iv_set(self, "@database", argv[0]);
|
144
144
|
rb_iv_set(self, "@user", user);
|
145
145
|
rb_iv_set(self, "@transactions", rb_ary_new());
|
146
|
-
|
146
|
+
rb_funcall(self, rb_intern("init_m17n"), 0);
|
147
|
+
|
147
148
|
return(self);
|
148
149
|
}
|
149
150
|
|
@@ -299,30 +300,10 @@ static VALUE connectionToString(VALUE self) {
|
|
299
300
|
* non-query statement.
|
300
301
|
*
|
301
302
|
*/
|
302
|
-
static VALUE executeOnConnection(VALUE self, VALUE sql, VALUE transaction) {
|
303
|
-
|
304
|
-
statement = rb_statement_new(self, transaction, sql, INT2FIX(3));
|
305
|
-
|
306
|
-
results = rb_execute_statement(statement);
|
307
|
-
if(results != Qnil && rb_obj_is_kind_of(results, rb_cInteger) == Qfalse) {
|
308
|
-
if(rb_block_given_p()) {
|
309
|
-
VALUE row = rb_funcall(results, rb_intern("fetch"), 0),
|
310
|
-
last = Qnil;
|
311
|
-
|
312
|
-
while(row != Qnil) {
|
313
|
-
last = rb_yield(row);
|
314
|
-
row = rb_funcall(results, rb_intern("fetch"), 0);
|
315
|
-
}
|
316
|
-
rb_funcall(results, rb_intern("close"), 0);
|
317
|
-
results = last;
|
318
|
-
}
|
319
|
-
}
|
320
|
-
rb_statement_close(statement);
|
321
|
-
|
322
|
-
return(results);
|
303
|
+
static VALUE executeOnConnection(VALUE self, VALUE sql, VALUE transaction) {
|
304
|
+
return rb_execute_sql(self, transaction, sql);
|
323
305
|
}
|
324
306
|
|
325
|
-
|
326
307
|
/**
|
327
308
|
* This function provides the execute_immediate method for the Connection class.
|
328
309
|
*
|
data/ext/ResultSet.c
CHANGED
@@ -240,7 +240,7 @@ VALUE fetchResultSetEntry(VALUE self) {
|
|
240
240
|
value;
|
241
241
|
|
242
242
|
Data_Get_Struct(self, ResultsHandle, results);
|
243
|
-
if(results->handle != 0) {
|
243
|
+
if(results->handle != 0 && !results->exhausted) {
|
244
244
|
VALUE array,number;
|
245
245
|
value = results->procedure_output_fetch_state;
|
246
246
|
if(value < 0) {
|
data/ext/Statement.c
CHANGED
@@ -621,6 +621,40 @@ VALUE rb_execute_statement_for(VALUE statement, VALUE parameters) {
|
|
621
621
|
}
|
622
622
|
|
623
623
|
|
624
|
+
/**
|
625
|
+
* This function provides a programmatic way of executing a SQL
|
626
|
+
* within transaction
|
627
|
+
*
|
628
|
+
* @param connection A reference to the connection object.
|
629
|
+
* @param transaction A reference to the transaction object.
|
630
|
+
* @param sql SQL text.
|
631
|
+
*
|
632
|
+
* @return A reference to the results of executing the statement.
|
633
|
+
*
|
634
|
+
*/
|
635
|
+
VALUE rb_execute_sql(VALUE connection, VALUE transaction, VALUE sql) {
|
636
|
+
VALUE results = Qnil,
|
637
|
+
statement = rb_statement_new(connection, transaction, sql, INT2FIX(3));
|
638
|
+
|
639
|
+
results = rb_execute_statement(statement);
|
640
|
+
if(results != Qnil && rb_obj_is_kind_of(results, rb_cInteger) == Qfalse) {
|
641
|
+
if(rb_block_given_p()) {
|
642
|
+
VALUE row = rb_funcall(results, rb_intern("fetch"), 0),
|
643
|
+
last = Qnil;
|
644
|
+
|
645
|
+
while(row != Qnil) {
|
646
|
+
last = rb_yield(row);
|
647
|
+
row = rb_funcall(results, rb_intern("fetch"), 0);
|
648
|
+
}
|
649
|
+
rb_funcall(results, rb_intern("close"), 0);
|
650
|
+
results = last;
|
651
|
+
}
|
652
|
+
}
|
653
|
+
rb_statement_close(statement);
|
654
|
+
|
655
|
+
return(results);
|
656
|
+
}
|
657
|
+
|
624
658
|
/**
|
625
659
|
* This method retrieves the type information for a Statement object.
|
626
660
|
*
|
data/ext/Statement.h
CHANGED
@@ -53,6 +53,7 @@ void execute(isc_tr_handle *, isc_stmt_handle *, short, XSQLDA *,
|
|
53
53
|
VALUE rb_statement_new(VALUE, VALUE, VALUE, VALUE);
|
54
54
|
VALUE rb_execute_statement(VALUE);
|
55
55
|
VALUE rb_execute_statement_for(VALUE, VALUE);
|
56
|
+
VALUE rb_execute_sql(VALUE, VALUE, VALUE);
|
56
57
|
VALUE rb_get_statement_type(VALUE);
|
57
58
|
void rb_statement_close(VALUE);
|
58
59
|
void statementFree(void *);
|
data/ext/Transaction.c
CHANGED
@@ -306,25 +306,7 @@ static VALUE executeOnTransaction(VALUE self, VALUE sql) {
|
|
306
306
|
}
|
307
307
|
|
308
308
|
connection = rb_ary_entry(list, 0);
|
309
|
-
|
310
|
-
results = rb_execute_statement(statement);
|
311
|
-
|
312
|
-
if(results != Qnil && rb_obj_is_kind_of(results, rb_cInteger) == Qfalse) {
|
313
|
-
if(rb_block_given_p()) {
|
314
|
-
VALUE row = rb_funcall(results, rb_intern("fetch"), 0),
|
315
|
-
last = Qnil;
|
316
|
-
|
317
|
-
while(row != Qnil) {
|
318
|
-
last = rb_yield(row);
|
319
|
-
row = rb_funcall(results, rb_intern("fetch"), 0);
|
320
|
-
}
|
321
|
-
rb_funcall(results, rb_intern("close"), 0);
|
322
|
-
results = last;
|
323
|
-
}
|
324
|
-
}
|
325
|
-
rb_statement_close(statement);
|
326
|
-
|
327
|
-
return(results);
|
309
|
+
return rb_execute_sql(connection, self, sql);
|
328
310
|
}
|
329
311
|
|
330
312
|
|
data/ext/TypeMap.c
CHANGED
@@ -57,22 +57,46 @@ void populateTimeField(VALUE, XSQLVAR *);
|
|
57
57
|
void populateTimestampField(VALUE, XSQLVAR *);
|
58
58
|
|
59
59
|
|
60
|
+
/**
|
61
|
+
* This function converts a sql data into ruby string
|
62
|
+
* respecting data encoding
|
63
|
+
*
|
64
|
+
* @param connection The connection object relating to the data
|
65
|
+
* @param sqlsubtype SQL subtype of the field (fot character types - used to hold encoding information)
|
66
|
+
* @param data A pointer to the sql data
|
67
|
+
* @param length Length of the sql data
|
68
|
+
*
|
69
|
+
* @return A Ruby String object with correct encoding
|
70
|
+
*
|
71
|
+
*/
|
72
|
+
VALUE createString(VALUE connection, short sqlsubtype, const char *data, short length) {
|
73
|
+
VALUE value = Qnil;
|
74
|
+
if (length >= 0) {
|
75
|
+
char *array = ALLOC_N(char, length + 1);
|
76
|
+
memcpy(array, data, length);
|
77
|
+
array[length] = 0;
|
78
|
+
value = rb_str_new2(array);
|
79
|
+
free(array);
|
80
|
+
value = rb_funcall(connection, rb_intern("force_encoding"), 2, value, INT2FIX(sqlsubtype));
|
81
|
+
}
|
82
|
+
return value;
|
83
|
+
}
|
84
|
+
|
60
85
|
/**
|
61
86
|
* This function converts a single XSQLVAR entry to a Ruby VALUE type.
|
62
87
|
*
|
63
88
|
* @param entry A pointer to the SQLVAR type containing the data to be
|
64
89
|
* converted.
|
65
|
-
* @param
|
66
|
-
* @param transaction
|
67
|
-
* data.
|
90
|
+
* @param connection The connection object relating to the data.
|
91
|
+
* @param transaction The transaction handle relating to the data.
|
68
92
|
*
|
69
93
|
* @return A Ruby type for the XSQLVAR entry. The actual type will depend on
|
70
94
|
* the field type referenced.
|
71
95
|
*
|
72
96
|
*/
|
73
97
|
VALUE toValue(XSQLVAR *entry,
|
74
|
-
|
75
|
-
|
98
|
+
VALUE connection,
|
99
|
+
VALUE transaction) {
|
76
100
|
VALUE value = rb_ary_new();
|
77
101
|
|
78
102
|
/* Check for NULL values. */
|
@@ -98,7 +122,7 @@ VALUE toValue(XSQLVAR *entry,
|
|
98
122
|
memset(table, 0, 256);
|
99
123
|
memcpy(column, entry->sqlname, entry->sqlname_length);
|
100
124
|
memcpy(table, entry->relname, entry->relname_length);
|
101
|
-
blob = openBlob(*(ISC_QUAD *)entry->sqldata, column, table,
|
125
|
+
blob = openBlob(*(ISC_QUAD *)entry->sqldata, column, table, connection,
|
102
126
|
transaction);
|
103
127
|
working = Data_Wrap_Struct(cBlob, NULL, blobFree, blob);
|
104
128
|
rb_ary_push(value, initializeBlob(working));
|
@@ -166,14 +190,8 @@ VALUE toValue(XSQLVAR *entry,
|
|
166
190
|
break;
|
167
191
|
|
168
192
|
case SQL_TEXT: /* Type: CHAR */
|
169
|
-
|
170
|
-
|
171
|
-
memset(array, 0, entry->sqllen + 1);
|
172
|
-
memcpy(array, entry->sqldata, entry->sqllen);
|
173
|
-
rb_ary_push(value, rb_str_new2(array));
|
174
|
-
rb_ary_push(value, getColumnType(entry));
|
175
|
-
free(array);
|
176
|
-
}
|
193
|
+
rb_ary_push(value, createString(connection, entry->sqlsubtype, entry->sqldata, entry->sqllen));
|
194
|
+
rb_ary_push(value, getColumnType(entry));
|
177
195
|
break;
|
178
196
|
|
179
197
|
case SQL_TYPE_TIME: /* Type: TIME */
|
@@ -193,16 +211,8 @@ VALUE toValue(XSQLVAR *entry,
|
|
193
211
|
|
194
212
|
case SQL_VARYING:
|
195
213
|
memcpy(&length, entry->sqldata, 2);
|
196
|
-
|
197
|
-
|
198
|
-
if(array != NULL) {
|
199
|
-
memset(array, 0, length + 1);
|
200
|
-
memcpy(array, &entry->sqldata[2], length);
|
201
|
-
rb_ary_push(value, rb_str_new2(array));
|
202
|
-
rb_ary_push(value, getColumnType(entry));
|
203
|
-
free(array);
|
204
|
-
}
|
205
|
-
}
|
214
|
+
rb_ary_push(value, createString(connection, entry->sqlsubtype, &entry->sqldata[2], length));
|
215
|
+
rb_ary_push(value, getColumnType(entry));
|
206
216
|
break;
|
207
217
|
|
208
218
|
default:
|
@@ -233,17 +243,13 @@ VALUE toArray(VALUE results) {
|
|
233
243
|
transaction = rb_iv_get(results, "@transaction"),
|
234
244
|
connection = rb_iv_get(results, "@connection");
|
235
245
|
XSQLVAR *entry = NULL;
|
236
|
-
ConnectionHandle *cHandle = NULL;
|
237
246
|
ResultsHandle *rHandle = NULL;
|
238
|
-
TransactionHandle *tHandle = NULL;
|
239
247
|
int i;
|
240
248
|
|
241
|
-
Data_Get_Struct(connection, ConnectionHandle, cHandle);
|
242
249
|
Data_Get_Struct(results, ResultsHandle, rHandle);
|
243
|
-
Data_Get_Struct(transaction, TransactionHandle, tHandle);
|
244
250
|
entry = rHandle->output->sqlvar;
|
245
251
|
for(i = 0; i < rHandle->output->sqln; i++, entry++) {
|
246
|
-
VALUE value = toValue(entry,
|
252
|
+
VALUE value = toValue(entry, connection, transaction);
|
247
253
|
|
248
254
|
rb_ary_push(array, value);
|
249
255
|
}
|
data/ext/TypeMap.h
CHANGED
data/ext/uncrustify.cfg
ADDED
@@ -0,0 +1,1298 @@
|
|
1
|
+
# Uncrustify 0.55
|
2
|
+
|
3
|
+
#
|
4
|
+
# General options
|
5
|
+
#
|
6
|
+
|
7
|
+
# The type of line endings
|
8
|
+
newlines = auto # auto/lf/crlf/cr
|
9
|
+
|
10
|
+
# The original size of tabs in the input
|
11
|
+
input_tab_size = 8 # number
|
12
|
+
|
13
|
+
# The size of tabs in the output (only used if align_with_tabs=true)
|
14
|
+
output_tab_size = 2 # number
|
15
|
+
|
16
|
+
# The ASCII value of the string escape char, usually 92 (\) or 94 (^). (Pawn)
|
17
|
+
string_escape_char = 92 # number
|
18
|
+
|
19
|
+
# Alternate string escape char for Pawn. Only works right before the quote char.
|
20
|
+
string_escape_char2 = 0 # number
|
21
|
+
|
22
|
+
#
|
23
|
+
# Indenting
|
24
|
+
#
|
25
|
+
|
26
|
+
# The number of columns to indent per level.
|
27
|
+
# Usually 2, 3, 4, or 8.
|
28
|
+
indent_columns = 2 # number
|
29
|
+
|
30
|
+
# How to use tabs when indenting code
|
31
|
+
# 0=spaces only
|
32
|
+
# 1=indent with tabs, align with spaces
|
33
|
+
# 2=indent and align with tabs
|
34
|
+
indent_with_tabs = 0 # number
|
35
|
+
|
36
|
+
# Whether to indent strings broken by '\' so that they line up
|
37
|
+
indent_align_string = true # false/true
|
38
|
+
|
39
|
+
# The number of spaces to indent multi-line XML strings.
|
40
|
+
# Requires indent_align_string=True
|
41
|
+
indent_xml_string = 0 # number
|
42
|
+
|
43
|
+
# Spaces to indent '{' from level
|
44
|
+
indent_brace = 0 # number
|
45
|
+
|
46
|
+
# Whether braces are indented to the body level
|
47
|
+
indent_braces = false # false/true
|
48
|
+
|
49
|
+
# Disabled indenting function braces if indent_braces is true
|
50
|
+
indent_braces_no_func = false # false/true
|
51
|
+
|
52
|
+
# Indent based on the size of the brace parent, i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc.
|
53
|
+
indent_brace_parent = false # false/true
|
54
|
+
|
55
|
+
# Whether the 'namespace' body is indented
|
56
|
+
indent_namespace = true # false/true
|
57
|
+
|
58
|
+
# The number of spaces to indent a namespace block
|
59
|
+
indent_namespace_level = 0 # number
|
60
|
+
|
61
|
+
# If the body of the namespace is longer than this number, it won't be indented.
|
62
|
+
# Requires indent_namespace=true. Default=0 (no limit)
|
63
|
+
indent_namespace_limit = 0 # number
|
64
|
+
|
65
|
+
# Whether the 'extern "C"' body is indented
|
66
|
+
indent_extern = false # false/true
|
67
|
+
|
68
|
+
# Whether the 'class' body is indented
|
69
|
+
indent_class = false # false/true
|
70
|
+
|
71
|
+
# Whether to indent the stuff after a leading class colon
|
72
|
+
indent_class_colon = false # false/true
|
73
|
+
|
74
|
+
# False=treat 'else\nif' as 'else if' for indenting purposes
|
75
|
+
# True=indent the 'if' one level
|
76
|
+
indent_else_if = false # false/true
|
77
|
+
|
78
|
+
# Amount to indent variable declarations after a open brace. neg=relative, pos=absolute
|
79
|
+
indent_var_def_blk = 0 # number
|
80
|
+
|
81
|
+
# True: indent continued function call parameters one indent level
|
82
|
+
# False: align parameters under the open paren
|
83
|
+
indent_func_call_param = false # false/true
|
84
|
+
|
85
|
+
# Same as indent_func_call_param, but for function defs
|
86
|
+
indent_func_def_param = false # false/true
|
87
|
+
|
88
|
+
# Same as indent_func_call_param, but for function protos
|
89
|
+
indent_func_proto_param = false # false/true
|
90
|
+
|
91
|
+
# Same as indent_func_call_param, but for class declarations
|
92
|
+
indent_func_class_param = false # false/true
|
93
|
+
|
94
|
+
# Same as indent_func_call_param, but for class variable constructors
|
95
|
+
indent_func_ctor_var_param = false # false/true
|
96
|
+
|
97
|
+
# Same as indent_func_call_param, but for templates
|
98
|
+
indent_template_param = false # false/true
|
99
|
+
|
100
|
+
# Double the indent for indent_func_xxx_param options
|
101
|
+
indent_func_param_double = false # false/true
|
102
|
+
|
103
|
+
# Indentation column for standalone 'const' function decl/proto qualifier
|
104
|
+
indent_func_const = 0 # number
|
105
|
+
|
106
|
+
# Indentation column for standalone 'throw' function decl/proto qualifier
|
107
|
+
indent_func_throw = 0 # number
|
108
|
+
|
109
|
+
# The number of spaces to indent a continued '->' or '.'
|
110
|
+
# Usually set to 0, 1, or indent_columns.
|
111
|
+
indent_member = 0 # number
|
112
|
+
|
113
|
+
# Spaces to indent single line ('//') comments on lines before code
|
114
|
+
indent_sing_line_comments = 0 # number
|
115
|
+
|
116
|
+
# If set, will indent trailing single line ('//') comments relative
|
117
|
+
# to the code instead of trying to keep the same absolute column
|
118
|
+
indent_relative_single_line_comments = false # false/true
|
119
|
+
|
120
|
+
# Spaces to indent 'case' from 'switch'
|
121
|
+
# Usually 0 or indent_columns.
|
122
|
+
indent_switch_case = 0 # number
|
123
|
+
|
124
|
+
# Spaces to shift the 'case' line, without affecting any other lines
|
125
|
+
# Usually 0.
|
126
|
+
indent_case_shift = 0 # number
|
127
|
+
|
128
|
+
# Spaces to indent '{' from 'case'.
|
129
|
+
# By default, the brace will appear under the 'c' in case.
|
130
|
+
# Usually set to 0 or indent_columns.
|
131
|
+
indent_case_brace = 0 # number
|
132
|
+
|
133
|
+
# Whether to indent comments found in first column
|
134
|
+
indent_col1_comment = false # false/true
|
135
|
+
|
136
|
+
# How to indent goto labels
|
137
|
+
# >0 : absolute column where 1 is the leftmost column
|
138
|
+
# <=0 : subtract from brace indent
|
139
|
+
indent_label = 1 # number
|
140
|
+
|
141
|
+
# Same as indent_label, but for access specifiers that are followed by a colon
|
142
|
+
indent_access_spec = 1 # number
|
143
|
+
|
144
|
+
# Indent the code after an access specifier by one level.
|
145
|
+
# If set, this option forces 'indent_access_spec=0'
|
146
|
+
indent_access_spec_body = false # false/true
|
147
|
+
|
148
|
+
# If an open paren is followed by a newline, indent the next line so that it lines up after the open paren (not recommended)
|
149
|
+
indent_paren_nl = false # false/true
|
150
|
+
|
151
|
+
# Controls the indent of a close paren after a newline.
|
152
|
+
# 0: Indent to body level
|
153
|
+
# 1: Align under the open paren
|
154
|
+
# 2: Indent to the brace level
|
155
|
+
indent_paren_close = 1 # number
|
156
|
+
|
157
|
+
# Controls the indent of a comma when inside a paren.If TRUE, aligns under the open paren
|
158
|
+
indent_comma_paren = false # false/true
|
159
|
+
|
160
|
+
# Controls the indent of a BOOL operator when inside a paren.If TRUE, aligns under the open paren
|
161
|
+
indent_bool_paren = false # false/true
|
162
|
+
|
163
|
+
# If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended)
|
164
|
+
indent_square_nl = false # false/true
|
165
|
+
|
166
|
+
# Don't change the relative indent of ESQL/C 'EXEC SQL' bodies
|
167
|
+
indent_preserve_sql = false # false/true
|
168
|
+
|
169
|
+
# Align continued statements at the '='. Default=True
|
170
|
+
# If FALSE or the '=' is followed by a newline, the next line is indent one tab.
|
171
|
+
indent_align_assign = true # false/true
|
172
|
+
|
173
|
+
#
|
174
|
+
# Spacing options
|
175
|
+
#
|
176
|
+
|
177
|
+
# Add or remove space around arithmetic operator '+', '-', '/', '*', etc
|
178
|
+
sp_arith = ignore # ignore/add/remove/force
|
179
|
+
|
180
|
+
# Add or remove space around assignment operator '=', '+=', etc
|
181
|
+
sp_assign = ignore # ignore/add/remove/force
|
182
|
+
|
183
|
+
# Add or remove space before assignment operator '=', '+=', etc. Overrides sp_assign.
|
184
|
+
sp_before_assign = ignore # ignore/add/remove/force
|
185
|
+
|
186
|
+
# Add or remove space after assignment operator '=', '+=', etc. Overrides sp_assign.
|
187
|
+
sp_after_assign = ignore # ignore/add/remove/force
|
188
|
+
|
189
|
+
# Add or remove space around assignment '=' in enum
|
190
|
+
sp_enum_assign = ignore # ignore/add/remove/force
|
191
|
+
|
192
|
+
# Add or remove space before assignment '=' in enum. Overrides sp_enum_assign.
|
193
|
+
sp_enum_before_assign = ignore # ignore/add/remove/force
|
194
|
+
|
195
|
+
# Add or remove space after assignment '=' in enum. Overrides sp_enum_assign.
|
196
|
+
sp_enum_after_assign = ignore # ignore/add/remove/force
|
197
|
+
|
198
|
+
# Add or remove space around preprocessor '##' concatenation operator. Default=Add
|
199
|
+
sp_pp_concat = add # ignore/add/remove/force
|
200
|
+
|
201
|
+
# Add or remove space after preprocessor '#' stringify operator. Default=Add
|
202
|
+
sp_pp_stringify = add # ignore/add/remove/force
|
203
|
+
|
204
|
+
# Add or remove space around boolean operators '&&' and '||'
|
205
|
+
sp_bool = ignore # ignore/add/remove/force
|
206
|
+
|
207
|
+
# Add or remove space around compare operator '<', '>', '==', etc
|
208
|
+
sp_compare = ignore # ignore/add/remove/force
|
209
|
+
|
210
|
+
# Add or remove space inside '(' and ')'
|
211
|
+
sp_inside_paren = ignore # ignore/add/remove/force
|
212
|
+
|
213
|
+
# Add or remove space between nested parens
|
214
|
+
sp_paren_paren = ignore # ignore/add/remove/force
|
215
|
+
|
216
|
+
# Whether to balance spaces inside nested parens
|
217
|
+
sp_balance_nested_parens = false # false/true
|
218
|
+
|
219
|
+
# Add or remove space between ')' and '{'
|
220
|
+
sp_paren_brace = force # ignore/add/remove/force
|
221
|
+
|
222
|
+
# Add or remove space before pointer star '*'
|
223
|
+
sp_before_ptr_star = ignore # ignore/add/remove/force
|
224
|
+
|
225
|
+
# Add or remove space before pointer star '*' that isn't followed by a variable name
|
226
|
+
# If set to 'ignore', sp_before_ptr_star is used instead.
|
227
|
+
sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force
|
228
|
+
|
229
|
+
# Add or remove space between pointer stars '*'
|
230
|
+
sp_between_ptr_star = ignore # ignore/add/remove/force
|
231
|
+
|
232
|
+
# Add or remove space after pointer star '*', if followed by a word.
|
233
|
+
sp_after_ptr_star = ignore # ignore/add/remove/force
|
234
|
+
|
235
|
+
# Add or remove space after a pointer star '*', if followed by a func proto/def.
|
236
|
+
sp_after_ptr_star_func = ignore # ignore/add/remove/force
|
237
|
+
|
238
|
+
# Add or remove space before a pointer star '*', if followed by a func proto/def.
|
239
|
+
sp_before_ptr_star_func = ignore # ignore/add/remove/force
|
240
|
+
|
241
|
+
# Add or remove space before a reference sign '&'
|
242
|
+
sp_before_byref = ignore # ignore/add/remove/force
|
243
|
+
|
244
|
+
# Add or remove space before a reference sign '&' that isn't followed by a variable name
|
245
|
+
# If set to 'ignore', sp_before_byref is used instead.
|
246
|
+
sp_before_unnamed_byref = ignore # ignore/add/remove/force
|
247
|
+
|
248
|
+
# Add or remove space after reference sign '&', if followed by a word.
|
249
|
+
sp_after_byref = ignore # ignore/add/remove/force
|
250
|
+
|
251
|
+
# Add or remove space after a reference sign '&', if followed by a func proto/def.
|
252
|
+
sp_after_byref_func = ignore # ignore/add/remove/force
|
253
|
+
|
254
|
+
# Add or remove space before a reference sign '&', if followed by a func proto/def.
|
255
|
+
sp_before_byref_func = ignore # ignore/add/remove/force
|
256
|
+
|
257
|
+
# Add or remove space between type and word. Default=Force
|
258
|
+
sp_after_type = force # ignore/add/remove/force
|
259
|
+
|
260
|
+
# Add or remove space in 'template <' vs 'template<'.
|
261
|
+
# If set to ignore, sp_before_angle is used.
|
262
|
+
sp_template_angle = ignore # ignore/add/remove/force
|
263
|
+
|
264
|
+
# Add or remove space before '<>'
|
265
|
+
sp_before_angle = ignore # ignore/add/remove/force
|
266
|
+
|
267
|
+
# Add or remove space inside '<' and '>'
|
268
|
+
sp_inside_angle = ignore # ignore/add/remove/force
|
269
|
+
|
270
|
+
# Add or remove space after '<>'
|
271
|
+
sp_after_angle = ignore # ignore/add/remove/force
|
272
|
+
|
273
|
+
# Add or remove space between '<>' and '(' as found in 'new List<byte>();'
|
274
|
+
sp_angle_paren = ignore # ignore/add/remove/force
|
275
|
+
|
276
|
+
# Add or remove space between '<>' and a word as in 'List<byte> m;'
|
277
|
+
sp_angle_word = ignore # ignore/add/remove/force
|
278
|
+
|
279
|
+
# Add or remove space before '(' of 'if', 'for', 'switch', and 'while'
|
280
|
+
sp_before_sparen = ignore # ignore/add/remove/force
|
281
|
+
|
282
|
+
# Add or remove space inside if-condition '(' and ')'
|
283
|
+
sp_inside_sparen = ignore # ignore/add/remove/force
|
284
|
+
|
285
|
+
# Add or remove space before if-condition ')'. Overrides sp_inside_sparen.
|
286
|
+
sp_inside_sparen_close = ignore # ignore/add/remove/force
|
287
|
+
|
288
|
+
# Add or remove space after ')' of 'if', 'for', 'switch', and 'while'
|
289
|
+
sp_after_sparen = ignore # ignore/add/remove/force
|
290
|
+
|
291
|
+
# Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while'
|
292
|
+
sp_sparen_brace = force # ignore/add/remove/force
|
293
|
+
|
294
|
+
# Add or remove space between 'invariant' and '(' in the D language.
|
295
|
+
sp_invariant_paren = ignore # ignore/add/remove/force
|
296
|
+
|
297
|
+
# Add or remove space after the ')' in 'invariant (C) c' in the D language.
|
298
|
+
sp_after_invariant_paren = ignore # ignore/add/remove/force
|
299
|
+
|
300
|
+
# Add or remove space before empty statement ';' on 'if', 'for' and 'while'
|
301
|
+
sp_special_semi = ignore # ignore/add/remove/force
|
302
|
+
|
303
|
+
# Add or remove space before ';'. Default=Remove
|
304
|
+
sp_before_semi = remove # ignore/add/remove/force
|
305
|
+
|
306
|
+
# Add or remove space before ';' in non-empty 'for' statements
|
307
|
+
sp_before_semi_for = ignore # ignore/add/remove/force
|
308
|
+
|
309
|
+
# Add or remove space before a semicolon of an empty part of a for statement.
|
310
|
+
sp_before_semi_for_empty = ignore # ignore/add/remove/force
|
311
|
+
|
312
|
+
# Add or remove space after ';', except when followed by a comment. Default=Add
|
313
|
+
sp_after_semi = add # ignore/add/remove/force
|
314
|
+
|
315
|
+
# Add or remove space after ';' in non-empty 'for' statements. Default=Force
|
316
|
+
sp_after_semi_for = force # ignore/add/remove/force
|
317
|
+
|
318
|
+
# Add or remove space after the final semicolon of an empty part of a for statement: for ( ; ; <here> ).
|
319
|
+
sp_after_semi_for_empty = ignore # ignore/add/remove/force
|
320
|
+
|
321
|
+
# Add or remove space before '[' (except '[]')
|
322
|
+
sp_before_square = ignore # ignore/add/remove/force
|
323
|
+
|
324
|
+
# Add or remove space before '[]'
|
325
|
+
sp_before_squares = ignore # ignore/add/remove/force
|
326
|
+
|
327
|
+
# Add or remove space inside '[' and ']'
|
328
|
+
sp_inside_square = ignore # ignore/add/remove/force
|
329
|
+
|
330
|
+
# Add or remove space after ','
|
331
|
+
sp_after_comma = ignore # ignore/add/remove/force
|
332
|
+
|
333
|
+
# Add or remove space before ','
|
334
|
+
sp_before_comma = remove # ignore/add/remove/force
|
335
|
+
|
336
|
+
# Add or remove space before the variadic '...' when preceded by a non-punctuator
|
337
|
+
sp_before_ellipsis = ignore # ignore/add/remove/force
|
338
|
+
|
339
|
+
# Add or remove space after class ':'
|
340
|
+
sp_after_class_colon = ignore # ignore/add/remove/force
|
341
|
+
|
342
|
+
# Add or remove space before class ':'
|
343
|
+
sp_before_class_colon = ignore # ignore/add/remove/force
|
344
|
+
|
345
|
+
# Add or remove space before case ':'. Default=Remove
|
346
|
+
sp_before_case_colon = remove # ignore/add/remove/force
|
347
|
+
|
348
|
+
# Add or remove space between 'operator' and operator sign
|
349
|
+
sp_after_operator = ignore # ignore/add/remove/force
|
350
|
+
|
351
|
+
# Add or remove space between the operator symbol and the open paren, as in 'operator ++('
|
352
|
+
sp_after_operator_sym = ignore # ignore/add/remove/force
|
353
|
+
|
354
|
+
# Add or remove space after C/D cast, i.e. 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a'
|
355
|
+
sp_after_cast = ignore # ignore/add/remove/force
|
356
|
+
|
357
|
+
# Add or remove spaces inside cast parens
|
358
|
+
sp_inside_paren_cast = ignore # ignore/add/remove/force
|
359
|
+
|
360
|
+
# Add or remove space between the type and open paren in a C++ cast, i.e. 'int(exp)' vs 'int (exp)'
|
361
|
+
sp_cpp_cast_paren = ignore # ignore/add/remove/force
|
362
|
+
|
363
|
+
# Add or remove space between 'sizeof' and '('
|
364
|
+
sp_sizeof_paren = ignore # ignore/add/remove/force
|
365
|
+
|
366
|
+
# Add or remove space after the tag keyword (Pawn)
|
367
|
+
sp_after_tag = ignore # ignore/add/remove/force
|
368
|
+
|
369
|
+
# Add or remove space inside enum '{' and '}'
|
370
|
+
sp_inside_braces_enum = ignore # ignore/add/remove/force
|
371
|
+
|
372
|
+
# Add or remove space inside struct/union '{' and '}'
|
373
|
+
sp_inside_braces_struct = ignore # ignore/add/remove/force
|
374
|
+
|
375
|
+
# Add or remove space inside '{' and '}'
|
376
|
+
sp_inside_braces = ignore # ignore/add/remove/force
|
377
|
+
|
378
|
+
# Add or remove space inside '{}'
|
379
|
+
sp_inside_braces_empty = ignore # ignore/add/remove/force
|
380
|
+
|
381
|
+
# Add or remove space between return type and function name
|
382
|
+
# A minimum of 1 is forced except for pointer return types.
|
383
|
+
sp_type_func = ignore # ignore/add/remove/force
|
384
|
+
|
385
|
+
# Add or remove space between function name and '(' on function declaration
|
386
|
+
sp_func_proto_paren = ignore # ignore/add/remove/force
|
387
|
+
|
388
|
+
# Add or remove space between function name and '(' on function definition
|
389
|
+
sp_func_def_paren = ignore # ignore/add/remove/force
|
390
|
+
|
391
|
+
# Add or remove space inside empty function '()'
|
392
|
+
sp_inside_fparens = ignore # ignore/add/remove/force
|
393
|
+
|
394
|
+
# Add or remove space inside function '(' and ')'
|
395
|
+
sp_inside_fparen = ignore # ignore/add/remove/force
|
396
|
+
|
397
|
+
# Add or remove space between ']' and '(' when part of a function call.
|
398
|
+
sp_square_fparen = ignore # ignore/add/remove/force
|
399
|
+
|
400
|
+
# Add or remove space between ')' and '{' of function
|
401
|
+
sp_fparen_brace = force # ignore/add/remove/force
|
402
|
+
|
403
|
+
# Add or remove space between function name and '(' on function calls
|
404
|
+
sp_func_call_paren = ignore # ignore/add/remove/force
|
405
|
+
|
406
|
+
# Add or remove space between the user function name and '(' on function calls
|
407
|
+
# You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file.
|
408
|
+
sp_func_call_user_paren = ignore # ignore/add/remove/force
|
409
|
+
|
410
|
+
# Add or remove space between a constructor/destructor and the open paren
|
411
|
+
sp_func_class_paren = ignore # ignore/add/remove/force
|
412
|
+
|
413
|
+
# Add or remove space between 'return' and '('
|
414
|
+
sp_return_paren = ignore # ignore/add/remove/force
|
415
|
+
|
416
|
+
# Add or remove space between '__attribute__' and '('
|
417
|
+
sp_attribute_paren = ignore # ignore/add/remove/force
|
418
|
+
|
419
|
+
# Add or remove space between 'defined' and '(' in '#if defined (FOO)'
|
420
|
+
sp_defined_paren = ignore # ignore/add/remove/force
|
421
|
+
|
422
|
+
# Add or remove space between 'throw' and '(' in 'throw (something)'
|
423
|
+
sp_throw_paren = ignore # ignore/add/remove/force
|
424
|
+
|
425
|
+
# Add or remove space between macro and value
|
426
|
+
sp_macro = ignore # ignore/add/remove/force
|
427
|
+
|
428
|
+
# Add or remove space between macro function ')' and value
|
429
|
+
sp_macro_func = ignore # ignore/add/remove/force
|
430
|
+
|
431
|
+
# Add or remove space between 'else' and '{' if on the same line
|
432
|
+
sp_else_brace = force # ignore/add/remove/force
|
433
|
+
|
434
|
+
# Add or remove space between '}' and 'else' if on the same line
|
435
|
+
sp_brace_else = force # ignore/add/remove/force
|
436
|
+
|
437
|
+
# Add or remove space between '}' and the name of a typedef on the same line
|
438
|
+
sp_brace_typedef = force # ignore/add/remove/force
|
439
|
+
|
440
|
+
# Add or remove space between 'catch' and '{' if on the same line
|
441
|
+
sp_catch_brace = force # ignore/add/remove/force
|
442
|
+
|
443
|
+
# Add or remove space between '}' and 'catch' if on the same line
|
444
|
+
sp_brace_catch = force # ignore/add/remove/force
|
445
|
+
|
446
|
+
# Add or remove space between 'finally' and '{' if on the same line
|
447
|
+
sp_finally_brace = force # ignore/add/remove/force
|
448
|
+
|
449
|
+
# Add or remove space between '}' and 'finally' if on the same line
|
450
|
+
sp_brace_finally = force # ignore/add/remove/force
|
451
|
+
|
452
|
+
# Add or remove space between 'try' and '{' if on the same line
|
453
|
+
sp_try_brace = force # ignore/add/remove/force
|
454
|
+
|
455
|
+
# Add or remove space between get/set and '{' if on the same line
|
456
|
+
sp_getset_brace = ignore # ignore/add/remove/force
|
457
|
+
|
458
|
+
# Add or remove space before the '::' operator
|
459
|
+
sp_before_dc = ignore # ignore/add/remove/force
|
460
|
+
|
461
|
+
# Add or remove space after the '::' operator
|
462
|
+
sp_after_dc = ignore # ignore/add/remove/force
|
463
|
+
|
464
|
+
# Add or remove around the D named array initializer ':' operator
|
465
|
+
sp_d_array_colon = ignore # ignore/add/remove/force
|
466
|
+
|
467
|
+
# Add or remove space after the '!' (not) operator. Default=Remove
|
468
|
+
sp_not = remove # ignore/add/remove/force
|
469
|
+
|
470
|
+
# Add or remove space after the '~' (invert) operator. Default=Remove
|
471
|
+
sp_inv = remove # ignore/add/remove/force
|
472
|
+
|
473
|
+
# Add or remove space after the '&' (address-of) operator. Default=Remove
|
474
|
+
# This does not affect the spacing after a '&' that is part of a type.
|
475
|
+
sp_addr = remove # ignore/add/remove/force
|
476
|
+
|
477
|
+
# Add or remove space around the '.' or '->' operators. Default=Remove
|
478
|
+
sp_member = remove # ignore/add/remove/force
|
479
|
+
|
480
|
+
# Add or remove space after the '*' (dereference) operator. Default=Remove
|
481
|
+
# This does not affect the spacing after a '*' that is part of a type.
|
482
|
+
sp_deref = remove # ignore/add/remove/force
|
483
|
+
|
484
|
+
# Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. Default=Remove
|
485
|
+
sp_sign = remove # ignore/add/remove/force
|
486
|
+
|
487
|
+
# Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'. Default=Remove
|
488
|
+
sp_incdec = remove # ignore/add/remove/force
|
489
|
+
|
490
|
+
# Add or remove space before a backslash-newline at the end of a line. Default=Add
|
491
|
+
sp_before_nl_cont = add # ignore/add/remove/force
|
492
|
+
|
493
|
+
# Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;'
|
494
|
+
sp_after_oc_scope = ignore # ignore/add/remove/force
|
495
|
+
|
496
|
+
# Add or remove space after the colon in message specs
|
497
|
+
# '-(int) f:(int) x;' vs '-(int) f: (int) x;'
|
498
|
+
sp_after_oc_colon = ignore # ignore/add/remove/force
|
499
|
+
|
500
|
+
# Add or remove space before the colon in message specs
|
501
|
+
# '-(int) f: (int) x;' vs '-(int) f : (int) x;'
|
502
|
+
sp_before_oc_colon = ignore # ignore/add/remove/force
|
503
|
+
|
504
|
+
# Add or remove space after the colon in message specs
|
505
|
+
# '[object setValue:1];' vs '[object setValue: 1];'
|
506
|
+
sp_after_send_oc_colon = ignore # ignore/add/remove/force
|
507
|
+
|
508
|
+
# Add or remove space before the colon in message specs
|
509
|
+
# '[object setValue:1];' vs '[object setValue :1];'
|
510
|
+
sp_before_send_oc_colon = ignore # ignore/add/remove/force
|
511
|
+
|
512
|
+
# Add or remove space after the (type) in message specs
|
513
|
+
# '-(int)f: (int) x;' vs '-(int)f: (int)x;'
|
514
|
+
sp_after_oc_type = ignore # ignore/add/remove/force
|
515
|
+
|
516
|
+
# Add or remove space after the first (type) in message specs
|
517
|
+
# '-(int) f:(int)x;' vs '-(int)f:(int)x;'
|
518
|
+
sp_after_oc_return_type = ignore # ignore/add/remove/force
|
519
|
+
|
520
|
+
# Add or remove space between '@selector' and '('
|
521
|
+
# '@selector(msgName).' vs '@selector (msgName)'
|
522
|
+
sp_after_oc_at_sel = ignore # ignore/add/remove/force
|
523
|
+
|
524
|
+
# Add or remove space before a block pointer caret
|
525
|
+
# '^int (int arg){...}' vs. ' ^int (int arg){...}'
|
526
|
+
sp_before_oc_block_caret = ignore # ignore/add/remove/force
|
527
|
+
|
528
|
+
# Add or remove space after a block pointer caret
|
529
|
+
# '^int (int arg){...}' vs. '^ int (int arg){...}'
|
530
|
+
sp_after_oc_block_caret = ignore # ignore/add/remove/force
|
531
|
+
|
532
|
+
# Add or remove space around the ':' in 'b ? t : f'
|
533
|
+
sp_cond_colon = ignore # ignore/add/remove/force
|
534
|
+
|
535
|
+
# Add or remove space around the '?' in 'b ? t : f'
|
536
|
+
sp_cond_question = ignore # ignore/add/remove/force
|
537
|
+
|
538
|
+
# Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here.
|
539
|
+
sp_case_label = ignore # ignore/add/remove/force
|
540
|
+
|
541
|
+
# Control the space around the D '..' operator.
|
542
|
+
sp_range = ignore # ignore/add/remove/force
|
543
|
+
|
544
|
+
# Control the space after the opening of a C++ comment '// A' vs '//A'
|
545
|
+
sp_cmt_cpp_start = ignore # ignore/add/remove/force
|
546
|
+
|
547
|
+
# Controls the spaces between #else or #endif and a trailing comment
|
548
|
+
sp_endif_cmt = ignore # ignore/add/remove/force
|
549
|
+
|
550
|
+
#
|
551
|
+
# Code alignment (not left column spaces/tabs)
|
552
|
+
#
|
553
|
+
|
554
|
+
# Whether to keep non-indenting tabs
|
555
|
+
align_keep_tabs = false # false/true
|
556
|
+
|
557
|
+
# Whether to use tabs for aligning
|
558
|
+
align_with_tabs = false # false/true
|
559
|
+
|
560
|
+
# Whether to bump out to the next tab when aligning
|
561
|
+
align_on_tabstop = false # false/true
|
562
|
+
|
563
|
+
# Whether to left-align numbers
|
564
|
+
align_number_left = false # false/true
|
565
|
+
|
566
|
+
# Align variable definitions in prototypes and functions
|
567
|
+
align_func_params = false # false/true
|
568
|
+
|
569
|
+
# Align parameters in single-line functions that have the same name.
|
570
|
+
# The function names must already be aligned with each other.
|
571
|
+
align_same_func_call_params = false # false/true
|
572
|
+
|
573
|
+
# The span for aligning variable definitions (0=don't align)
|
574
|
+
align_var_def_span = 0 # number
|
575
|
+
|
576
|
+
# How to align the star in variable definitions.
|
577
|
+
# 0=Part of the type 'void * foo;'
|
578
|
+
# 1=Part of the variable 'void *foo;'
|
579
|
+
# 2=Dangling 'void *foo;'
|
580
|
+
align_var_def_star_style = 0 # number
|
581
|
+
|
582
|
+
# How to align the '&' in variable definitions.
|
583
|
+
# 0=Part of the type
|
584
|
+
# 1=Part of the variable
|
585
|
+
# 2=Dangling
|
586
|
+
align_var_def_amp_style = 0 # number
|
587
|
+
|
588
|
+
# The threshold for aligning variable definitions (0=no limit)
|
589
|
+
align_var_def_thresh = 0 # number
|
590
|
+
|
591
|
+
# The gap for aligning variable definitions
|
592
|
+
align_var_def_gap = 0 # number
|
593
|
+
|
594
|
+
# Whether to align the colon in struct bit fields
|
595
|
+
align_var_def_colon = false # false/true
|
596
|
+
|
597
|
+
# Whether to align any attribute after the variable name
|
598
|
+
align_var_def_attribute = false # false/true
|
599
|
+
|
600
|
+
# Whether to align inline struct/enum/union variable definitions
|
601
|
+
align_var_def_inline = false # false/true
|
602
|
+
|
603
|
+
# The span for aligning on '=' in assignments (0=don't align)
|
604
|
+
align_assign_span = 0 # number
|
605
|
+
|
606
|
+
# The threshold for aligning on '=' in assignments (0=no limit)
|
607
|
+
align_assign_thresh = 0 # number
|
608
|
+
|
609
|
+
# The span for aligning on '=' in enums (0=don't align)
|
610
|
+
align_enum_equ_span = 0 # number
|
611
|
+
|
612
|
+
# The threshold for aligning on '=' in enums (0=no limit)
|
613
|
+
align_enum_equ_thresh = 0 # number
|
614
|
+
|
615
|
+
# The span for aligning struct/union (0=don't align)
|
616
|
+
align_var_struct_span = 0 # number
|
617
|
+
|
618
|
+
# The threshold for aligning struct/union member definitions (0=no limit)
|
619
|
+
align_var_struct_thresh = 0 # number
|
620
|
+
|
621
|
+
# The gap for aligning struct/union member definitions
|
622
|
+
align_var_struct_gap = 0 # number
|
623
|
+
|
624
|
+
# The span for aligning struct initializer values (0=don't align)
|
625
|
+
align_struct_init_span = 0 # number
|
626
|
+
|
627
|
+
# The minimum space between the type and the synonym of a typedef
|
628
|
+
align_typedef_gap = 0 # number
|
629
|
+
|
630
|
+
# The span for aligning single-line typedefs (0=don't align)
|
631
|
+
align_typedef_span = 0 # number
|
632
|
+
|
633
|
+
# How to align typedef'd functions with other typedefs
|
634
|
+
# 0: Don't mix them at all
|
635
|
+
# 1: align the open paren with the types
|
636
|
+
# 2: align the function type name with the other type names
|
637
|
+
align_typedef_func = 0 # number
|
638
|
+
|
639
|
+
# Controls the positioning of the '*' in typedefs. Just try it.
|
640
|
+
# 0: Align on typedef type, ignore '*'
|
641
|
+
# 1: The '*' is part of type name: typedef int *pint;
|
642
|
+
# 2: The '*' is part of the type, but dangling: typedef int *pint;
|
643
|
+
align_typedef_star_style = 0 # number
|
644
|
+
|
645
|
+
# Controls the positioning of the '&' in typedefs. Just try it.
|
646
|
+
# 0: Align on typedef type, ignore '&'
|
647
|
+
# 1: The '&' is part of type name: typedef int &pint;
|
648
|
+
# 2: The '&' is part of the type, but dangling: typedef int &pint;
|
649
|
+
align_typedef_amp_style = 0 # number
|
650
|
+
|
651
|
+
# The span for aligning comments that end lines (0=don't align)
|
652
|
+
align_right_cmt_span = 0 # number
|
653
|
+
|
654
|
+
# If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment
|
655
|
+
align_right_cmt_mix = false # false/true
|
656
|
+
|
657
|
+
# If a trailing comment is more than this number of columns away from the text it follows,
|
658
|
+
# it will qualify for being aligned.
|
659
|
+
align_right_cmt_gap = 0 # number
|
660
|
+
|
661
|
+
# Align trailing comment at or beyond column N; 'pulls in' comments as a bonus side effect (0=ignore)
|
662
|
+
align_right_cmt_at_col = 0 # number
|
663
|
+
|
664
|
+
# The span for aligning function prototypes (0=don't align)
|
665
|
+
align_func_proto_span = 0 # number
|
666
|
+
|
667
|
+
# Minimum gap between the return type and the function name.
|
668
|
+
align_func_proto_gap = 0 # number
|
669
|
+
|
670
|
+
# Align function protos on the 'operator' keyword instead of what follows
|
671
|
+
align_on_operator = false # false/true
|
672
|
+
|
673
|
+
# Whether to mix aligning prototype and variable declarations.
|
674
|
+
# If true, align_var_def_XXX options are used instead of align_func_proto_XXX options.
|
675
|
+
align_mix_var_proto = false # false/true
|
676
|
+
|
677
|
+
# Align single-line functions with function prototypes, uses align_func_proto_span
|
678
|
+
align_single_line_func = false # false/true
|
679
|
+
|
680
|
+
# Aligning the open brace of single-line functions.
|
681
|
+
# Requires align_single_line_func=true, uses align_func_proto_span
|
682
|
+
align_single_line_brace = false # false/true
|
683
|
+
|
684
|
+
# Gap for align_single_line_brace.
|
685
|
+
align_single_line_brace_gap = 0 # number
|
686
|
+
|
687
|
+
# The span for aligning ObjC msg spec (0=don't align)
|
688
|
+
align_oc_msg_spec_span = 0 # number
|
689
|
+
|
690
|
+
# Whether to align macros wrapped with a backslash and a newline.
|
691
|
+
# This will not work right if the macro contains a multi-line comment.
|
692
|
+
align_nl_cont = false # false/true
|
693
|
+
|
694
|
+
# The minimum space between label and value of a preprocessor define
|
695
|
+
align_pp_define_gap = 0 # number
|
696
|
+
|
697
|
+
# The span for aligning on '#define' bodies (0=don't align)
|
698
|
+
align_pp_define_span = 0 # number
|
699
|
+
|
700
|
+
# Align lines that start with '<<' with previous '<<'. Default=true
|
701
|
+
align_left_shift = true # false/true
|
702
|
+
|
703
|
+
# Span for aligning parameters in an Obj-C message call on the ':' (0=don't align)
|
704
|
+
align_oc_msg_colon_span = 0 # number
|
705
|
+
|
706
|
+
#
|
707
|
+
# Newline adding and removing options
|
708
|
+
#
|
709
|
+
|
710
|
+
# Whether to collapse empty blocks between '{' and '}'
|
711
|
+
nl_collapse_empty_body = false # false/true
|
712
|
+
|
713
|
+
# Don't split one-line braced assignments - 'foo_t f = { 1, 2 };'
|
714
|
+
nl_assign_leave_one_liners = false # false/true
|
715
|
+
|
716
|
+
# Don't split one-line braced statements inside a class xx { } body
|
717
|
+
nl_class_leave_one_liners = false # false/true
|
718
|
+
|
719
|
+
# Don't split one-line enums: 'enum foo { BAR = 15 };'
|
720
|
+
nl_enum_leave_one_liners = false # false/true
|
721
|
+
|
722
|
+
# Don't split one-line get or set functions
|
723
|
+
nl_getset_leave_one_liners = false # false/true
|
724
|
+
|
725
|
+
# Don't split one-line function definitions - 'int foo() { return 0; }'
|
726
|
+
nl_func_leave_one_liners = false # false/true
|
727
|
+
|
728
|
+
# Don't split one-line if/else statements - 'if(a) b++;'
|
729
|
+
nl_if_leave_one_liners = false # false/true
|
730
|
+
|
731
|
+
# Add or remove newlines at the start of the file
|
732
|
+
nl_start_of_file = ignore # ignore/add/remove/force
|
733
|
+
|
734
|
+
# The number of newlines at the start of the file (only used if nl_start_of_file is 'add' or 'force'
|
735
|
+
nl_start_of_file_min = 0 # number
|
736
|
+
|
737
|
+
# Add or remove newline at the end of the file
|
738
|
+
nl_end_of_file = ignore # ignore/add/remove/force
|
739
|
+
|
740
|
+
# The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force')
|
741
|
+
nl_end_of_file_min = 0 # number
|
742
|
+
|
743
|
+
# Add or remove newline between '=' and '{'
|
744
|
+
nl_assign_brace = ignore # ignore/add/remove/force
|
745
|
+
|
746
|
+
# Add or remove newline between '=' and '[' (D only)
|
747
|
+
nl_assign_square = ignore # ignore/add/remove/force
|
748
|
+
|
749
|
+
# Add or remove newline after '= [' (D only). Will also affect the newline before the ']'
|
750
|
+
nl_after_square_assign = ignore # ignore/add/remove/force
|
751
|
+
|
752
|
+
# The number of newlines after a block of variable definitions
|
753
|
+
nl_func_var_def_blk = 0 # number
|
754
|
+
|
755
|
+
# Add or remove newline between a function call's ')' and '{', as in:
|
756
|
+
# list_for_each(item, &list) { }
|
757
|
+
nl_fcall_brace = remove # ignore/add/remove/force
|
758
|
+
|
759
|
+
# Add or remove newline between 'enum' and '{'
|
760
|
+
nl_enum_brace = remove # ignore/add/remove/force
|
761
|
+
|
762
|
+
# Add or remove newline between 'struct and '{'
|
763
|
+
nl_struct_brace = remove # ignore/add/remove/force
|
764
|
+
|
765
|
+
# Add or remove newline between 'union' and '{'
|
766
|
+
nl_union_brace = remove # ignore/add/remove/force
|
767
|
+
|
768
|
+
# Add or remove newline between 'if' and '{'
|
769
|
+
nl_if_brace = remove # ignore/add/remove/force
|
770
|
+
|
771
|
+
# Add or remove newline between '}' and 'else'
|
772
|
+
nl_brace_else = remove # ignore/add/remove/force
|
773
|
+
|
774
|
+
# Add or remove newline between 'else if' and '{'
|
775
|
+
# If set to ignore, nl_if_brace is used instead
|
776
|
+
nl_elseif_brace = remove # ignore/add/remove/force
|
777
|
+
|
778
|
+
# Add or remove newline between 'else' and '{'
|
779
|
+
nl_else_brace = remove # ignore/add/remove/force
|
780
|
+
|
781
|
+
# Add or remove newline between 'else' and 'if'
|
782
|
+
nl_else_if = remove # ignore/add/remove/force
|
783
|
+
|
784
|
+
# Add or remove newline between '}' and 'finally'
|
785
|
+
nl_brace_finally = remove # ignore/add/remove/force
|
786
|
+
|
787
|
+
# Add or remove newline between 'finally' and '{'
|
788
|
+
nl_finally_brace = remove # ignore/add/remove/force
|
789
|
+
|
790
|
+
# Add or remove newline between 'try' and '{'
|
791
|
+
nl_try_brace = remove # ignore/add/remove/force
|
792
|
+
|
793
|
+
# Add or remove newline between get/set and '{'
|
794
|
+
nl_getset_brace = remove # ignore/add/remove/force
|
795
|
+
|
796
|
+
# Add or remove newline between 'for' and '{'
|
797
|
+
nl_for_brace = remove # ignore/add/remove/force
|
798
|
+
|
799
|
+
# Add or remove newline between 'catch' and '{'
|
800
|
+
nl_catch_brace = remove # ignore/add/remove/force
|
801
|
+
|
802
|
+
# Add or remove newline between '}' and 'catch'
|
803
|
+
nl_brace_catch = remove # ignore/add/remove/force
|
804
|
+
|
805
|
+
# Add or remove newline between 'while' and '{'
|
806
|
+
nl_while_brace = remove # ignore/add/remove/force
|
807
|
+
|
808
|
+
# Add or remove newline between two open or close braces.
|
809
|
+
# Due to general newline/brace handling, REMOVE may not work.
|
810
|
+
nl_brace_brace = ignore # ignore/add/remove/force
|
811
|
+
|
812
|
+
# Add or remove newline between 'do' and '{'
|
813
|
+
nl_do_brace = remove # ignore/add/remove/force
|
814
|
+
|
815
|
+
# Add or remove newline between '}' and 'while' of 'do' statement
|
816
|
+
nl_brace_while = remove # ignore/add/remove/force
|
817
|
+
|
818
|
+
# Add or remove newline between 'switch' and '{'
|
819
|
+
nl_switch_brace = remove # ignore/add/remove/force
|
820
|
+
|
821
|
+
# Add a newline between ')' and '{' if the ')' is on a different line than the if/for/etc.
|
822
|
+
# Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch, and nl_catch_brace.
|
823
|
+
nl_multi_line_cond = false # false/true
|
824
|
+
|
825
|
+
# Force a newline in a define after the macro name for multi-line defines.
|
826
|
+
nl_multi_line_define = false # false/true
|
827
|
+
|
828
|
+
# Whether to put a newline before 'case' statement
|
829
|
+
nl_before_case = false # false/true
|
830
|
+
|
831
|
+
# Add or remove newline between ')' and 'throw'
|
832
|
+
nl_before_throw = ignore # ignore/add/remove/force
|
833
|
+
|
834
|
+
# Whether to put a newline after 'case' statement
|
835
|
+
nl_after_case = false # false/true
|
836
|
+
|
837
|
+
# Newline between namespace and {
|
838
|
+
nl_namespace_brace = remove # ignore/add/remove/force
|
839
|
+
|
840
|
+
# Add or remove newline between 'template<>' and whatever follows.
|
841
|
+
nl_template_class = ignore # ignore/add/remove/force
|
842
|
+
|
843
|
+
# Add or remove newline between 'class' and '{'
|
844
|
+
nl_class_brace = remove # ignore/add/remove/force
|
845
|
+
|
846
|
+
# Add or remove newline after each ',' in the constructor member initialization
|
847
|
+
nl_class_init_args = ignore # ignore/add/remove/force
|
848
|
+
|
849
|
+
# Add or remove newline between return type and function name in a function definition
|
850
|
+
nl_func_type_name = ignore # ignore/add/remove/force
|
851
|
+
|
852
|
+
# Add or remove newline between return type and function name inside a class {}
|
853
|
+
# Uses nl_func_type_name or nl_func_proto_type_name if set to ignore.
|
854
|
+
nl_func_type_name_class = ignore # ignore/add/remove/force
|
855
|
+
|
856
|
+
# Add or remove newline between function scope and name in a definition
|
857
|
+
# Controls the newline after '::' in 'void A::f() { }'
|
858
|
+
nl_func_scope_name = ignore # ignore/add/remove/force
|
859
|
+
|
860
|
+
# Add or remove newline between return type and function name in a prototype
|
861
|
+
nl_func_proto_type_name = ignore # ignore/add/remove/force
|
862
|
+
|
863
|
+
# Add or remove newline between a function name and the opening '('
|
864
|
+
nl_func_paren = ignore # ignore/add/remove/force
|
865
|
+
|
866
|
+
# Add or remove newline after '(' in a function declaration
|
867
|
+
nl_func_decl_start = ignore # ignore/add/remove/force
|
868
|
+
|
869
|
+
# Overrides nl_func_decl_start when there is only one paramter.
|
870
|
+
nl_func_decl_start_single = ignore # ignore/add/remove/force
|
871
|
+
|
872
|
+
# Add or remove newline after each ',' in a function declaration
|
873
|
+
nl_func_decl_args = ignore # ignore/add/remove/force
|
874
|
+
|
875
|
+
# Add or remove newline before the ')' in a function declaration
|
876
|
+
nl_func_decl_end = ignore # ignore/add/remove/force
|
877
|
+
|
878
|
+
# Overrides nl_func_decl_end when there is only one paramter.
|
879
|
+
nl_func_decl_end_single = ignore # ignore/add/remove/force
|
880
|
+
|
881
|
+
# Add or remove newline between '()' in a function declaration.
|
882
|
+
nl_func_decl_empty = ignore # ignore/add/remove/force
|
883
|
+
|
884
|
+
# Add or remove newline between function signature and '{'
|
885
|
+
nl_fdef_brace = remove # ignore/add/remove/force
|
886
|
+
|
887
|
+
# Whether to put a newline after 'return' statement
|
888
|
+
nl_after_return = false # false/true
|
889
|
+
|
890
|
+
# Add or remove a newline between the return keyword and return expression.
|
891
|
+
nl_return_expr = ignore # ignore/add/remove/force
|
892
|
+
|
893
|
+
# Whether to put a newline after semicolons, except in 'for' statements
|
894
|
+
nl_after_semicolon = false # false/true
|
895
|
+
|
896
|
+
# Whether to put a newline after brace open.
|
897
|
+
# This also adds a newline before the matching brace close.
|
898
|
+
nl_after_brace_open = false # false/true
|
899
|
+
|
900
|
+
# If nl_after_brace_open and nl_after_brace_open_cmt are true, a newline is
|
901
|
+
# placed between the open brace and a trailing single-line comment.
|
902
|
+
nl_after_brace_open_cmt = false # false/true
|
903
|
+
|
904
|
+
# Whether to put a newline after a virtual brace open with a non-empty body.
|
905
|
+
# These occur in un-braced if/while/do/for statement bodies.
|
906
|
+
nl_after_vbrace_open = false # false/true
|
907
|
+
|
908
|
+
# Whether to put a newline after a virtual brace open with an empty body.
|
909
|
+
# These occur in un-braced if/while/do/for statement bodies.
|
910
|
+
nl_after_vbrace_open_empty = false # false/true
|
911
|
+
|
912
|
+
# Whether to put a newline after a brace close.
|
913
|
+
# Does not apply if followed by a necessary ';'.
|
914
|
+
nl_after_brace_close = false # false/true
|
915
|
+
|
916
|
+
# Whether to alter newlines in '#define' macros
|
917
|
+
nl_define_macro = false # false/true
|
918
|
+
|
919
|
+
# Whether to not put blanks after '#ifxx', '#elxx', or before '#endif'
|
920
|
+
nl_squeeze_ifdef = false # false/true
|
921
|
+
|
922
|
+
# Add or remove newline before 'if'
|
923
|
+
nl_before_if = ignore # ignore/add/remove/force
|
924
|
+
|
925
|
+
# Add or remove newline after 'if'
|
926
|
+
nl_after_if = ignore # ignore/add/remove/force
|
927
|
+
|
928
|
+
# Add or remove newline before 'for'
|
929
|
+
nl_before_for = ignore # ignore/add/remove/force
|
930
|
+
|
931
|
+
# Add or remove newline after 'for'
|
932
|
+
nl_after_for = ignore # ignore/add/remove/force
|
933
|
+
|
934
|
+
# Add or remove newline before 'while'
|
935
|
+
nl_before_while = ignore # ignore/add/remove/force
|
936
|
+
|
937
|
+
# Add or remove newline after 'while'
|
938
|
+
nl_after_while = ignore # ignore/add/remove/force
|
939
|
+
|
940
|
+
# Add or remove newline before 'switch'
|
941
|
+
nl_before_switch = ignore # ignore/add/remove/force
|
942
|
+
|
943
|
+
# Add or remove newline after 'switch'
|
944
|
+
nl_after_switch = ignore # ignore/add/remove/force
|
945
|
+
|
946
|
+
# Add or remove newline before 'do'
|
947
|
+
nl_before_do = ignore # ignore/add/remove/force
|
948
|
+
|
949
|
+
# Add or remove newline after 'do'
|
950
|
+
nl_after_do = ignore # ignore/add/remove/force
|
951
|
+
|
952
|
+
# Whether to double-space commented-entries in struct/enum
|
953
|
+
nl_ds_struct_enum_cmt = false # false/true
|
954
|
+
|
955
|
+
# Whether to double-space before the close brace of a struct/union/enum
|
956
|
+
nl_ds_struct_enum_close_brace = false # false/true
|
957
|
+
|
958
|
+
# Add or remove a newline around a class colon.
|
959
|
+
# Related to pos_class_colon, nl_class_init_args, and pos_comma.
|
960
|
+
nl_class_colon = ignore # ignore/add/remove/force
|
961
|
+
|
962
|
+
# Change simple unbraced if statements into a one-liner
|
963
|
+
# 'if(b)\n i++;' => 'if(b) i++;'
|
964
|
+
nl_create_if_one_liner = false # false/true
|
965
|
+
|
966
|
+
# Change simple unbraced for statements into a one-liner
|
967
|
+
# 'for (i=0;i<5;i++)\n foo(i);' => 'for (i=0;i<5;i++) foo(i);'
|
968
|
+
nl_create_for_one_liner = false # false/true
|
969
|
+
|
970
|
+
# Change simple unbraced while statements into a one-liner
|
971
|
+
# 'while (i<5)\n foo(i++);' => 'while (i<5) foo(i++);'
|
972
|
+
nl_create_while_one_liner = false # false/true
|
973
|
+
|
974
|
+
#
|
975
|
+
# Positioning options
|
976
|
+
#
|
977
|
+
|
978
|
+
# The position of arithmetic operators in wrapped expressions
|
979
|
+
pos_arith = ignore # ignore/lead/trail
|
980
|
+
|
981
|
+
# The position of assignment in wrapped expressions.
|
982
|
+
# Do not affect '=' followed by '{'
|
983
|
+
pos_assign = ignore # ignore/lead/trail
|
984
|
+
|
985
|
+
# The position of boolean operators in wrapped expressions
|
986
|
+
pos_bool = ignore # ignore/lead/trail
|
987
|
+
|
988
|
+
# The position of comparison operators in wrapped expressions
|
989
|
+
pos_compare = ignore # ignore/lead/trail
|
990
|
+
|
991
|
+
# The position of conditional (b ? t : f) operators in wrapped expressions
|
992
|
+
pos_conditional = ignore # ignore/lead/trail
|
993
|
+
|
994
|
+
# The position of the comma in wrapped expressions
|
995
|
+
pos_comma = ignore # ignore/lead/trail
|
996
|
+
|
997
|
+
# The position of the comma in the constructor initialization list
|
998
|
+
pos_class_comma = ignore # ignore/lead/trail
|
999
|
+
|
1000
|
+
# The position of colons between constructor and member initialization
|
1001
|
+
pos_class_colon = ignore # ignore/lead/trail
|
1002
|
+
|
1003
|
+
#
|
1004
|
+
# Line Splitting options
|
1005
|
+
#
|
1006
|
+
|
1007
|
+
# Try to limit code width to N number of columns
|
1008
|
+
code_width = 0 # number
|
1009
|
+
|
1010
|
+
# Whether to fully split long 'for' statements at semi-colons
|
1011
|
+
ls_for_split_full = false # false/true
|
1012
|
+
|
1013
|
+
# Whether to fully split long function protos/calls at commas
|
1014
|
+
ls_func_split_full = false # false/true
|
1015
|
+
|
1016
|
+
#
|
1017
|
+
# Blank line options
|
1018
|
+
#
|
1019
|
+
|
1020
|
+
# The maximum consecutive newlines
|
1021
|
+
nl_max = 0 # number
|
1022
|
+
|
1023
|
+
# The number of newlines after a function prototype, if followed by another function prototype
|
1024
|
+
nl_after_func_proto = 0 # number
|
1025
|
+
|
1026
|
+
# The number of newlines after a function prototype, if not followed by another function prototype
|
1027
|
+
nl_after_func_proto_group = 0 # number
|
1028
|
+
|
1029
|
+
# The number of newlines after '}' of a multi-line function body
|
1030
|
+
nl_after_func_body = 0 # number
|
1031
|
+
|
1032
|
+
# The number of newlines after '}' of a single line function body
|
1033
|
+
nl_after_func_body_one_liner = 0 # number
|
1034
|
+
|
1035
|
+
# The minimum number of newlines before a multi-line comment.
|
1036
|
+
# Doesn't apply if after a brace open or another multi-line comment.
|
1037
|
+
nl_before_block_comment = 0 # number
|
1038
|
+
|
1039
|
+
# The minimum number of newlines before a single-line C comment.
|
1040
|
+
# Doesn't apply if after a brace open or other single-line C comments.
|
1041
|
+
nl_before_c_comment = 0 # number
|
1042
|
+
|
1043
|
+
# The minimum number of newlines before a CPP comment.
|
1044
|
+
# Doesn't apply if after a brace open or other CPP comments.
|
1045
|
+
nl_before_cpp_comment = 0 # number
|
1046
|
+
|
1047
|
+
# Whether to force a newline after a mulit-line comment.
|
1048
|
+
nl_after_multiline_comment = false # false/true
|
1049
|
+
|
1050
|
+
# The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
|
1051
|
+
# Will not change the newline count if after a brace open.
|
1052
|
+
# 0 = No change.
|
1053
|
+
nl_before_access_spec = 0 # number
|
1054
|
+
|
1055
|
+
# The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
|
1056
|
+
# 0 = No change.
|
1057
|
+
nl_after_access_spec = 0 # number
|
1058
|
+
|
1059
|
+
# The number of newlines between a function def and the function comment.
|
1060
|
+
# 0 = No change.
|
1061
|
+
nl_comment_func_def = 0 # number
|
1062
|
+
|
1063
|
+
# The number of newlines after a try-catch-finally block that isn't followed by a brace close.
|
1064
|
+
# 0 = No change.
|
1065
|
+
nl_after_try_catch_finally = 0 # number
|
1066
|
+
|
1067
|
+
# The number of newlines before and after a property, indexer or event decl.
|
1068
|
+
# 0 = No change.
|
1069
|
+
nl_around_cs_property = 0 # number
|
1070
|
+
|
1071
|
+
# The number of newlines between the get/set/add/remove handlers in C#.
|
1072
|
+
# 0 = No change.
|
1073
|
+
nl_between_get_set = 0 # number
|
1074
|
+
|
1075
|
+
# Whether to remove blank lines after '{'
|
1076
|
+
eat_blanks_after_open_brace = false # false/true
|
1077
|
+
|
1078
|
+
# Whether to remove blank lines before '}'
|
1079
|
+
eat_blanks_before_close_brace = false # false/true
|
1080
|
+
|
1081
|
+
#
|
1082
|
+
# Code modifying options (non-whitespace)
|
1083
|
+
#
|
1084
|
+
|
1085
|
+
# Add or remove braces on single-line 'do' statement
|
1086
|
+
mod_full_brace_do = ignore # ignore/add/remove/force
|
1087
|
+
|
1088
|
+
# Add or remove braces on single-line 'for' statement
|
1089
|
+
mod_full_brace_for = ignore # ignore/add/remove/force
|
1090
|
+
|
1091
|
+
# Add or remove braces on single-line function definitions. (Pawn)
|
1092
|
+
mod_full_brace_function = ignore # ignore/add/remove/force
|
1093
|
+
|
1094
|
+
# Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'.
|
1095
|
+
mod_full_brace_if = ignore # ignore/add/remove/force
|
1096
|
+
|
1097
|
+
# Make all if/elseif/else statements in a chain be braced or not. Overrides mod_full_brace_if.
|
1098
|
+
# If any must be braced, they are all braced. If all can be unbraced, then the braces are removed.
|
1099
|
+
mod_full_brace_if_chain = false # false/true
|
1100
|
+
|
1101
|
+
# Don't remove braces around statements that span N newlines
|
1102
|
+
mod_full_brace_nl = 0 # number
|
1103
|
+
|
1104
|
+
# Add or remove braces on single-line 'while' statement
|
1105
|
+
mod_full_brace_while = ignore # ignore/add/remove/force
|
1106
|
+
|
1107
|
+
# Add or remove unnecessary paren on 'return' statement
|
1108
|
+
mod_paren_on_return = ignore # ignore/add/remove/force
|
1109
|
+
|
1110
|
+
# Whether to change optional semicolons to real semicolons
|
1111
|
+
mod_pawn_semicolon = false # false/true
|
1112
|
+
|
1113
|
+
# Add parens on 'while' and 'if' statement around bools
|
1114
|
+
mod_full_paren_if_bool = false # false/true
|
1115
|
+
|
1116
|
+
# Whether to remove superfluous semicolons
|
1117
|
+
mod_remove_extra_semicolon = false # false/true
|
1118
|
+
|
1119
|
+
# If a function body exceeds the specified number of newlines and doesn't have a comment after
|
1120
|
+
# the close brace, a comment will be added.
|
1121
|
+
mod_add_long_function_closebrace_comment = 0 # number
|
1122
|
+
|
1123
|
+
# If a switch body exceeds the specified number of newlines and doesn't have a comment after
|
1124
|
+
# the close brace, a comment will be added.
|
1125
|
+
mod_add_long_switch_closebrace_comment = 0 # number
|
1126
|
+
|
1127
|
+
# If an #ifdef body exceeds the specified number of newlines and doesn't have a comment after
|
1128
|
+
# the #else, a comment will be added.
|
1129
|
+
mod_add_long_ifdef_endif_comment = 0 # number
|
1130
|
+
|
1131
|
+
# If an #ifdef or #else body exceeds the specified number of newlines and doesn't have a comment after
|
1132
|
+
# the #endif, a comment will be added.
|
1133
|
+
mod_add_long_ifdef_else_comment = 0 # number
|
1134
|
+
|
1135
|
+
# If TRUE, will sort consecutive single-line 'import' statements [Java, D]
|
1136
|
+
mod_sort_import = false # false/true
|
1137
|
+
|
1138
|
+
# If TRUE, will sort consecutive single-line 'using' statements [C#]
|
1139
|
+
mod_sort_using = false # false/true
|
1140
|
+
|
1141
|
+
# If TRUE, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C]
|
1142
|
+
# This is generally a bad idea, as it may break your code.
|
1143
|
+
mod_sort_include = false # false/true
|
1144
|
+
|
1145
|
+
# If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace.
|
1146
|
+
mod_move_case_break = false # false/true
|
1147
|
+
|
1148
|
+
# Will add or remove the braces around a fully braced case statement.
|
1149
|
+
# Will only remove the braces if there are no variable declarations in the block.
|
1150
|
+
mod_case_brace = ignore # ignore/add/remove/force
|
1151
|
+
|
1152
|
+
# If TRUE, it will remove a void 'return;' that appears as the last statement in a function.
|
1153
|
+
mod_remove_empty_return = false # false/true
|
1154
|
+
|
1155
|
+
#
|
1156
|
+
# Comment modifications
|
1157
|
+
#
|
1158
|
+
|
1159
|
+
# Try to wrap comments at cmt_width columns
|
1160
|
+
cmt_width = 0 # number
|
1161
|
+
|
1162
|
+
# Set the comment reflow mode (default: 0)
|
1163
|
+
# 0: no reflowing (apart from the line wrapping due to cmt_width)
|
1164
|
+
# 1: no touching at all
|
1165
|
+
# 2: full reflow
|
1166
|
+
cmt_reflow_mode = 0 # number
|
1167
|
+
|
1168
|
+
# If false, disable all multi-line comment changes, including cmt_width and leading chars.
|
1169
|
+
# Default is true.
|
1170
|
+
cmt_indent_multi = true # false/true
|
1171
|
+
|
1172
|
+
# Whether to group c-comments that look like they are in a block
|
1173
|
+
cmt_c_group = false # false/true
|
1174
|
+
|
1175
|
+
# Whether to put an empty '/*' on the first line of the combined c-comment
|
1176
|
+
cmt_c_nl_start = false # false/true
|
1177
|
+
|
1178
|
+
# Whether to put a newline before the closing '*/' of the combined c-comment
|
1179
|
+
cmt_c_nl_end = false # false/true
|
1180
|
+
|
1181
|
+
# Whether to group cpp-comments that look like they are in a block
|
1182
|
+
cmt_cpp_group = false # false/true
|
1183
|
+
|
1184
|
+
# Whether to put an empty '/*' on the first line of the combined cpp-comment
|
1185
|
+
cmt_cpp_nl_start = false # false/true
|
1186
|
+
|
1187
|
+
# Whether to put a newline before the closing '*/' of the combined cpp-comment
|
1188
|
+
cmt_cpp_nl_end = false # false/true
|
1189
|
+
|
1190
|
+
# Whether to change cpp-comments into c-comments
|
1191
|
+
cmt_cpp_to_c = false # false/true
|
1192
|
+
|
1193
|
+
# Whether to put a star on subsequent comment lines
|
1194
|
+
cmt_star_cont = false # false/true
|
1195
|
+
|
1196
|
+
# The number of spaces to insert at the start of subsequent comment lines
|
1197
|
+
cmt_sp_before_star_cont = 0 # number
|
1198
|
+
|
1199
|
+
# The number of spaces to insert after the star on subsequent comment lines
|
1200
|
+
cmt_sp_after_star_cont = 0 # number
|
1201
|
+
|
1202
|
+
# For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of
|
1203
|
+
# the comment are the same length. Default=True
|
1204
|
+
cmt_multi_check_last = true # false/true
|
1205
|
+
|
1206
|
+
# The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment.
|
1207
|
+
# Will substitute $(filename) with the current file's name.
|
1208
|
+
cmt_insert_file_header = "" # string
|
1209
|
+
|
1210
|
+
# The filename that contains text to insert at the end of a file if the file doesn't end with a C/C++ comment.
|
1211
|
+
# Will substitute $(filename) with the current file's name.
|
1212
|
+
cmt_insert_file_footer = "" # string
|
1213
|
+
|
1214
|
+
# The filename that contains text to insert before a function implementation if the function isn't preceded with a C/C++ comment.
|
1215
|
+
# Will substitute $(function) with the function name and $(javaparam) with the javadoc @param and @return stuff.
|
1216
|
+
# Will also substitute $(fclass) with the class name: void CFoo::Bar() { ... }
|
1217
|
+
cmt_insert_func_header = "" # string
|
1218
|
+
|
1219
|
+
# The filename that contains text to insert before a class if the class isn't preceded with a C/C++ comment.
|
1220
|
+
# Will substitute $(class) with the class name.
|
1221
|
+
cmt_insert_class_header = "" # string
|
1222
|
+
|
1223
|
+
# If a preprocessor is encountered when stepping backwards from a function name, then
|
1224
|
+
# this option decides whether the comment should be inserted.
|
1225
|
+
# Affects cmt_insert_func_header and cmt_insert_class_header.
|
1226
|
+
cmt_insert_before_preproc = false # false/true
|
1227
|
+
|
1228
|
+
#
|
1229
|
+
# Preprocessor options
|
1230
|
+
#
|
1231
|
+
|
1232
|
+
# Control indent of preprocessors inside #if blocks at brace level 0
|
1233
|
+
pp_indent = ignore # ignore/add/remove/force
|
1234
|
+
|
1235
|
+
# Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false)
|
1236
|
+
pp_indent_at_level = false # false/true
|
1237
|
+
|
1238
|
+
# If pp_indent_at_level=false, specifies the number of columns to indent per level. Default=1.
|
1239
|
+
pp_indent_count = 1 # number
|
1240
|
+
|
1241
|
+
# Add or remove space after # based on pp_level of #if blocks
|
1242
|
+
pp_space = ignore # ignore/add/remove/force
|
1243
|
+
|
1244
|
+
# Sets the number of spaces added with pp_space
|
1245
|
+
pp_space_count = 0 # number
|
1246
|
+
|
1247
|
+
# The indent for #region and #endregion in C# and '#pragma region' in C/C++
|
1248
|
+
pp_indent_region = 0 # number
|
1249
|
+
|
1250
|
+
# Whether to indent the code between #region and #endregion
|
1251
|
+
pp_region_indent_code = false # false/true
|
1252
|
+
|
1253
|
+
# If pp_indent_at_level=true, sets the indent for #if, #else, and #endif when not at file-level
|
1254
|
+
pp_indent_if = 0 # number
|
1255
|
+
|
1256
|
+
# Control whether to indent the code between #if, #else and #endif when not at file-level
|
1257
|
+
pp_if_indent_code = false # false/true
|
1258
|
+
|
1259
|
+
# Whether to indent '#define' at the brace level (true) or from column 1 (false)
|
1260
|
+
pp_define_at_level = false # false/true
|
1261
|
+
|
1262
|
+
# You can force a token to be a type with the 'type' option.
|
1263
|
+
# Example:
|
1264
|
+
# type myfoo1 myfoo2
|
1265
|
+
#
|
1266
|
+
# You can create custom macro-based indentation using macro-open,
|
1267
|
+
# macro-else and macro-close.
|
1268
|
+
# Example:
|
1269
|
+
# macro-open BEGIN_TEMPLATE_MESSAGE_MAP
|
1270
|
+
# macro-open BEGIN_MESSAGE_MAP
|
1271
|
+
# macro-close END_MESSAGE_MAP
|
1272
|
+
#
|
1273
|
+
# You can assign any keyword to any type with the set option.
|
1274
|
+
# set func_call_user _ N_
|
1275
|
+
#
|
1276
|
+
# The full syntax description of all custom definition config entries
|
1277
|
+
# is shown below:
|
1278
|
+
#
|
1279
|
+
# define custom tokens as:
|
1280
|
+
# - embed whitespace in token using '' escape character, or
|
1281
|
+
# put token in quotes
|
1282
|
+
# - these: ' " and ` are recognized as quote delimiters
|
1283
|
+
#
|
1284
|
+
# type token1 token2 token3 ...
|
1285
|
+
# ^ optionally specify multiple tokens on a single line
|
1286
|
+
# define def_token output_token
|
1287
|
+
# ^ output_token is optional, then NULL is assumed
|
1288
|
+
# macro-open token
|
1289
|
+
# macro-close token
|
1290
|
+
# macro-else token
|
1291
|
+
# set id token1 token2 ...
|
1292
|
+
# ^ optionally specify multiple tokens on a single line
|
1293
|
+
# ^ id is one of the names in token_enum.h sans the CT_ prefix,
|
1294
|
+
# e.g. PP_PRAGMA
|
1295
|
+
#
|
1296
|
+
# all tokens are separated by any mix of ',' commas, '=' equal signs
|
1297
|
+
# and whitespace (space, tab)
|
1298
|
+
#
|