-
Notifications
You must be signed in to change notification settings - Fork 34
/
.swiftlint.yml
494 lines (386 loc) · 8.43 KB
/
.swiftlint.yml
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
warning_threshold: 15
indentation: 4
analyzer_rules:
- explicit_self
- unused_declaration
- unused_import
only_rules:
- anyobject_protocol
- attributes
- block_based_kvo
- class_delegate_protocol
- closing_brace
- closure_end_indentation
- closure_spacing
- collection_alignment
- colon
- comma
- compiler_protocol_init
- computed_accessors_order
- conditional_returns_on_newline
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- control_statement
- convenience_type
- deployment_target
- discarded_notification_center_observer
- discouraged_direct_init
- discouraged_none_name
- discouraged_object_literal
- duplicate_enum_cases
- duplicate_imports
- duplicated_key_in_dictionary_literal
- dynamic_inline
- empty_collection_literal
- empty_count
- empty_enum_arguments
- empty_parameters
- empty_parentheses_with_trailing_closure
- empty_string
- empty_xctest_method
- enum_case_associated_values_count
- fallthrough
- fatal_error_message
- file_header
- file_length
- file_name_no_space
- first_where
- flatmap_over_map_reduce
- for_where
- force_cast
- force_try
- force_unwrapping
- generic_type_name
- identical_operands
- identifier_name
- implicit_getter
- implicit_return
- implicitly_unwrapped_optional
- inert_defer
- is_disjoint
- joined_default_parameter
- large_tuple
- last_where
- leading_whitespace
- legacy_cggeometry_functions
- legacy_constant
- legacy_constructor
- legacy_hashing
- legacy_multiple
- legacy_nsgeometry_functions
- legacy_random
- line_length
- literal_expression_end_indentation
- lower_acl_than_parent
- mark
- modifier_order
- multiline_arguments
- multiline_arguments_brackets
- multiline_literal_brackets
- multiline_parameters
- multiline_parameters_brackets
- multiple_closures_with_trailing_closure
- nesting
- nimble_operator
- no_space_in_method_call
- nslocalizedstring_key
- nsobject_prefer_isequal
- number_separator
- object_literal
- opening_brace
- operator_usage_whitespace
- operator_whitespace
- optional_enum_case_matching
- overridden_super_call
- override_in_extension
# - prohibited_nan_comparison
- prefer_self_type_over_type_of_self
- prefixed_toplevel_constant
- private_over_fileprivate
- private_unit_test
- prohibited_interface_builder
- prohibited_super_call
- protocol_property_accessors_order
- quick_discouraged_call
- quick_discouraged_focused_test
- quick_discouraged_pending_test
- reduce_boolean
- reduce_into
- redundant_discardable_let
- redundant_nil_coalescing
- redundant_objc_attribute
- redundant_optional_initialization
- redundant_set_access_control
- redundant_string_enum_value
- redundant_type_annotation
- redundant_void_return
# - return_value_from_void_function
- return_arrow_whitespace
- self_in_property_initialization
- shorthand_operator
- single_test_class
- sorted_first_last
- sorted_imports
- statement_position
- static_operator
- strong_iboutlet
- switch_case_alignment
- switch_case_on_newline
- syntactic_sugar
- superfluous_disable_command
- toggle_bool
- trailing_comma
- trailing_newline
- trailing_semicolon
- trailing_whitespace
# - tuple_pattern
- type_name
- unavailable_function
- unneeded_break_in_switch
- unowned_variable_capture
- unused_capture_list
- unused_closure_parameter
- unused_control_flow_label
- unused_enumerated
- unused_optional_binding
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
# - void_function_in_ternary
- void_return
- weak_delegate
- yoda_condition
# settings
anyobject_protocol:
severity: error
attributes:
severity: error
block_based_kvo:
severity: error
class_delegate_protocol:
severity: error
closing_brace:
severity: error
closure_spacing:
severity: error
colon:
severity: error
comma:
severity: error
compiler_protocol_init:
severity: error
computed_accessors_order:
severity: error
order: get_set
conditional_returns_on_newline:
severity: error
contains_over_filter_count:
severity: error
contains_over_filter_is_empty:
severity: error
contains_over_first_not_nil:
severity: error
contains_over_range_nil_comparison:
severity: error
control_statement:
severity: error
convenience_type:
severity: error
deployment_target:
severity: error
discarded_notification_center_observer:
severity: error
discouraged_direct_init:
severity: error
discouraged_none_name:
severity: warning
discouraged_object_literal:
severity: error
duplicate_enum_cases:
severity: error
duplicate_imports:
severity: error
duplicated_key_in_dictionary_literal:
severity: error
dynamic_inline:
severity: error
empty_collection_literal:
severity: error
empty_count:
severity: error
empty_enum_arguments:
severity: error
empty_parameters:
severity: error
empty_parentheses_with_trailing_closure:
severity: error
empty_string:
severity: error
empty_xctest_method:
severity: error
enum_case_associated_values_count:
warning: 4
error: 5
explicit_self:
severity: error
fallthrough:
severity: error
file_header:
forbidden_pattern: "^//[^/]|/\\*[^*]"
file_length:
warning: 400
error: 400
ignore_comment_only_lines: true
file_name_no_space:
severity: error
first_where:
severity: error
flatmap_over_map_reduce:
severity: error
for_where:
severity: error
force_cast:
severity: error
force_try:
severity: error
force_unwrapping:
severity: error
identical_operands:
severity: error
generic_type_name:
severity: error
identifier_name:
severity: error
excluded: ["i", "j", "x", "y", "z", "id", "to", "vk", "h1", "h2", "h3", "r", "g", "b", "no"]
max_length: 64
implicit_getter:
severity: error
implicit_return:
severity: error
implicitly_unwrapped_optional:
severity: error
is_disjoint:
severity: error
large_tuple:
warning: 3
error: 3
last_where:
severity: error
legacy_cggeometry_functions:
severity: error
legacy_constant:
severity: error
legacy_constructor:
severity: error
legacy_hashing:
severity: error
legacy_multiple:
severity: error
legacy_nsgeometry_functions:
severity: error
line_length:
warning: 120
error: 200
ignores_urls: true
ignores_comments: true
ignores_interpolated_strings: true
lower_acl_than_parent:
severity: error
mark:
severity: error
modifier_order:
severity: error
multiline_arguments:
severity: error
first_argument_location: next_line
multiline_arguments_brackets:
severity: error
multiline_literal_brackets:
severity: error
multiline_parameters:
severity: error
multiline_parameters_brackets:
severity: error
multiple_closures_with_trailing_closure:
severity: error
nesting:
# for dataflow
type_level: 3
number_separator:
minimum_length: 6
object_literal:
severity: error
image_literal: false
color_literal: false
opening_brace:
severity: error
operator_usage_whitespace:
severity: error
operator_whitespace:
severity: error
optional_enum_case_matching:
severity: error
overridden_super_call:
severity: error
prefer_self_type_over_type_of_self:
severity: error
prefixed_toplevel_constant:
severity: error
prohibited_super_call:
severity: error
prohibited_interface_builder:
severity: error
reduce_boolean:
severity: error
redundant_set_access_control:
severity: error
redundant_type_annotation:
severity: error
self_in_property_initialization:
severity: error
statement_position:
severity: error
static_operator:
severity: error
switch_case_alignment:
severity: error
switch_case_on_newline:
severity: error
syntactic_sugar:
severity: error
trailing_comma:
severity: error
trailing_newline:
severity: error
trailing_semicolon:
severity: error
# tuple_pattern:
# severity: error
type_name:
severity: error
max_length: 64
unneeded_break_in_switch:
severity: error
unowned_variable_capture:
severity: error
unused_enumerated:
severity: error
unused_import:
require_explicit_imports: true
allowed_transitive_imports:
- module: Foundation
allowed_transitive_imports:
- CoreFoundation
- Darwin
- ObjectiveC
unused_optional_binding:
severity: error
vertical_whitespace_closing_braces:
severity: error
vertical_whitespace_opening_braces:
severity: error
void_return:
severity: error
weak_delegate:
severity: error