-
Notifications
You must be signed in to change notification settings - Fork 11
/
.swiftlint.yml
674 lines (513 loc) · 27.7 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
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
disabled_rules: # rule identifiers to exclude from running
# Rationale: Xcode auto indentation can cause this warning
# https://github.com/realm/SwiftLint/blob/master/Rules.md#closure-end-indentation
- closure_end_indentation
# Rationale: Arbitrary restriction
# https://github.com/realm/SwiftLint/blob/master/Rules.md#cyclomatic-complexity
- cyclomatic_complexity
# Rationale: Arbitrary restriction
# https://github.com/realm/SwiftLint/blob/master/Rules.md#discouraged-object-literal
- discouraged_object_literal
# Rationale: Current implementation triggers on system APIs. Disabling until rule is configurable to fix this. An optional collection can have two "empty" states: nil and empty. If nil and empty are to mean different things, consider modeling it differently using an enum with associated values.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#discouraged-optional-collection
- discouraged_optional_collection
# Rationale: Doesn't really add any clarity
# https://github.com/realm/SwiftLint/blob/master/Rules.md#explicit-acl
- explicit_acl
# Rationale: Heavy handed in telling someone how to code
# https://github.com/realm/SwiftLint/blob/master/Rules.md#explicit-enum-raw-value
- explicit_enum_raw_value
# Rationale: Doesn't really add any clarity
# https://github.com/realm/SwiftLint/blob/master/Rules.md#explicit-top-level-acl
- explicit_top_level_acl
# Rationale: We don't want to fight the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#explicit-type-interface
- explicit_type_interface
# Rationale: Unclear on what it enforces
# https://github.com/realm/SwiftLint/blob/master/Rules.md#extension-access-modifier
- extension_access_modifier
# Rationale: Arbitrary restriction
# https://github.com/realm/SwiftLint/blob/master/Rules.md#file-line-length
- file_length
# Rationale: Arbitrary restriction
# https://github.com/realm/SwiftLint/blob/master/Rules.md#function-body-length
- function_body_length
# Rationale: Arbitrary restriction
# https://github.com/realm/SwiftLint/blob/master/Rules.md#function-parameter-count
- function_parameter_count
# Rationale: Arbitrary restriction
# https://github.com/realm/SwiftLint/blob/master/Rules.md#generic-type-name
- generic_type_name
# Rationale: Arbitrary restriction
# https://github.com/realm/SwiftLint/blob/master/Rules.md#identifier-name
- identifier_name
# Rationale: False positives
# https://github.com/realm/SwiftLint/blob/master/Rules.md#implicit-getter
- implicit_getter
# Rationale: Being concise and not fighting the language. We allow engineers to decide when and how to use implicit returns based on their best judgement.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#implicit-return
- implicit_return
# Rationale: Arbitrary restriction
# https://github.com/realm/SwiftLint/blob/master/Rules.md#large-tuple
- large_tuple
# Rationale: Arbitrary restriction
# https://github.com/realm/SwiftLint/blob/master/Rules.md#variable-declaration-whitespace
- let_var_whitespace
# Rationale: Arbitrary restriction
# https://github.com/realm/SwiftLint/blob/master/Rules.md#line-length
- line_length
# Rationale: Xcode auto indentation can cause this warning
# https://github.com/realm/SwiftLint/blob/master/Rules.md#literal-expression-end-indentation
- literal_expression_end_indentation
# Rationale: Functions with parameters followed by multiple closures trigger this warning when placed on separate lines. The default Xcode formatting for this behavior is inconsistent, and auto indentation is poor.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#multiline-arguments
- multiline_arguments
# Rationale: Functions with closures followed by a parenthesis trigger this warning.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#multiline-arguments-brackets
- multiline_arguments_brackets
# Rationale: Arbitrary restriction.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#multiline-literal-brackets
- multiline_literal_brackets
# Rationale: Arbitrary restriction.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#multiline-parameters-brackets
- multiline_parameters_brackets
# Rationale: Arbitrary restriction
# https://github.com/realm/SwiftLint/blob/master/Rules.md#nesting
- nesting
# Rationale: We don't use nimble
# https://github.com/realm/SwiftLint/blob/master/Rules.md#nimble-operator
- nimble_operator
# Rationale: Protocol conformance can require public declaration
# https://github.com/realm/SwiftLint/blob/master/Rules.md#no-extension-access-modifier
- no_extension_access_modifier
# Rationale: Heavy handed in telling someone how to program a specific way
# https://github.com/realm/SwiftLint/blob/master/Rules.md#no-grouping-extension
- no_grouping_extension
# Rationale: Unintuitive
# https://github.com/realm/SwiftLint/blob/master/Rules.md#number-separator
- number_separator
# Rationale: Doesn't really add anything other than telling someone how to code
# https://github.com/realm/SwiftLint/blob/master/Rules.md#object-literal
- object_literal
# Rationale: Old outdated convention
# https://github.com/realm/SwiftLint/blob/master/Rules.md#prefixed-top-level-constant
- prefixed_toplevel_constant
# Rationale: We don't use Quick
# https://github.com/realm/SwiftLint/blob/master/Rules.md#quick-discouraged-call
- quick_discouraged_call
# Rationale: We don't use Quick
# https://github.com/realm/SwiftLint/blob/master/Rules.md#quick-discouraged-focused-test
- quick_discouraged_focused_test
# Rationale: We don't use Quick
# https://github.com/realm/SwiftLint/blob/master/Rules.md#quick-discouraged-pending-test
- quick_discouraged_pending_test
# Rationale: Only should be enabled when the API uses snake case.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#raw_value_for_camel_cased_codable_enum
- raw_value_for_camel_cased_codable_enum
# Rationale: There are cases where you may want to declare the string enum value explicitly
# https://github.com/realm/SwiftLint/blob/master/Rules.md#redundant-string-enum-value
- redundant_string_enum_value
# Rationale: Do not require a deinit function, as it is not always necessary.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#required-deinit
- required_deinit
# Rationale: Provides no value
# https://github.com/realm/SwiftLint/blob/master/Rules.md#sorted-imports
- sorted_imports
# Rationale: Usage of proper access level
# https://github.com/realm/SwiftLint/blob/master/Rules.md#strict-fileprivate
- strict_fileprivate
# Rationale: Doesn't really add anything other than telling someone how to code
# https://github.com/realm/SwiftLint/blob/master/Rules.md#switch-case-on-newline
- switch_case_on_newline
# Rationale: Naming the parameters can be important for clarity in some instances
# https://github.com/realm/SwiftLint/blob/master/Rules.md#trailing-closure
- trailing_closure
# Rationale: Xcode auto indentation can cause this warning
# https://github.com/realm/SwiftLint/blob/master/Rules.md#trailing-whitespace
- trailing_whitespace
# Rationale: Arbitrary restriction
# https://github.com/realm/SwiftLint/blob/master/Rules.md#type-body-length
- type_body_length
# Rationale: Arbitrary restriction
# https://github.com/realm/SwiftLint/blob/master/Rules.md#type-name
- type_name
# Rationale: For typed parameters in closures, parentheses are required by swift, making this rule inherently inconsistent.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#unneeded-parentheses-in-closure-argument
- unneeded_parentheses_in_closure_argument
# Rationale: Custom rule overrides to allow todos when issue links are provided.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#todo
- todo
# Rationale: Allows for more readable code when defining new properties or functions on types.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#vertical-whitespace-after-opening-braces
- vertical_whitespace_opening_braces
# Rationale: Unnecessary whitespace.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#vertical-whitespace-between-cases
- vertical_whitespace_between_cases
# Rationale: Allow using XCTest functions as defined by the framework.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#xctest-specific-matcher
- xct_specific_matcher
# Rationale: Arbitrary restriction. The default bundle will be suitable for most projects.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#nslocalizedstring-require-bundle
- nslocalizedstring_require_bundle
# Rationale: The current rule set does not allow for enforcement of our preferred ordering (namely, private classes at the bottom of the file).
# https://github.com/realm/SwiftLint/blob/master/Rules.md#file-types-order
- file_types_order
# Rationale: The benefit of this rule is a minor performance improvement, at the potential cost of legibility. Leave up to the developer's discrection.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#reduce-into
- reduce_into
opt_in_rules: # some rules are only opt-in
# Rationale: When using map, we think of it being used to transform a current array into something else
# https://github.com/realm/SwiftLint/blob/master/Rules.md#array-init
- array_init
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#attributes
- attributes
# Rationale: Provides consistency in coding style and follows modern practices of the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#block-based-kvo
- block_based_kvo
# Rationale: Prevents retain cycles
# https://github.com/realm/SwiftLint/blob/master/Rules.md#class-delegate-protocol
- class_delegate_protocol
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#closing-brace-spacing
- closing_brace
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#closure-parameter-position
- closure_parameter_position
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#closure-spacing
- closure_spacing
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#colon
- colon
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#comma-spacing
- comma
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#compiler-protocol-init
- compiler_protocol_init
# Rationale: Encourages usage of assertion failures and thinking about what you are returning
# https://github.com/realm/SwiftLint/blob/master/Rules.md#conditional-returns-on-newline
- conditional_returns_on_newline
# Rationale: A more clear and consise way to check if something exists
# https://github.com/realm/SwiftLint/blob/master/Rules.md#contains_over_filter_count
- contains_over_filter_count
# Rationale: A more clear and consise way to check if something exists
# https://github.com/realm/SwiftLint/blob/master/Rules.md#contains_over_filter_is_empty
- contains_over_filter_is_empty
# Rationale: A more clear and consise way to check if something exists
# https://github.com/realm/SwiftLint/blob/master/Rules.md#contains-over-first-not-nil
- contains_over_first_not_nil
# Rationale: A more clear and consise way to check if a range exists
# https://github.com/realm/SwiftLint/blob/master/Rules.md#contains_over_range_nil_comparison
- contains_over_range_nil_comparison
# Rationale: Provides consistency in coding style and follows modern practices of the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#control-statement
- control_statement
# Rationale: Encourages proper memory practices
# https://github.com/realm/SwiftLint/blob/master/Rules.md#discarded-notification-center-observer
- discarded_notification_center_observer
# Rationale: Prevents coder error
# https://github.com/realm/SwiftLint/blob/master/Rules.md#discouraged-direct-initialization
- discouraged_direct_init
# Rationale: A nil bool is a tri-state variable which can be modeled more clearly
# https://github.com/realm/SwiftLint/blob/master/Rules.md#discouraged-optional-boolean
- discouraged_optional_boolean
# Rationale: Imports are not required more than once.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#duplicate-imports
- duplicate_imports
# Rationale: Prevents coder error
# https://github.com/realm/SwiftLint/blob/master/Rules.md#dynamic-inline
- dynamic_inline
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#empty_collection_literal
- empty_collection_literal
# Rationale: Provides consistency in coding style and follows modern practices of the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#empty-count
- empty_count
# Rationale: Provides consistency in coding style and brevity.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#empty-enum-arguments
- empty_enum_arguments
# Rationale: Provides consistency in coding style and follows modern practices of the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#empty-parameters
- empty_parameters
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#empty-parentheses-with-trailing-closure
- empty_parentheses_with_trailing_closure
# Rationale: Provides consistency in coding style and follows modern practices of the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#empty-string
- empty_string
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#explicit-init
- explicit_init
# Rationale: Prevents coder error
# https://github.com/realm/SwiftLint/blob/master/Rules.md#fallthrough
- fallthrough
# Rationale: Encourages better documentation
# https://github.com/realm/SwiftLint/blob/master/Rules.md#fatal-error-message
- fatal_error_message
# Rationale: Provides consistency
# https://github.com/realm/SwiftLint/blob/master/Rules.md#file-header
- file_header
# Rationale: Encourages using the right API to solve a problem
# https://github.com/realm/SwiftLint/blob/master/Rules.md#first-where
- first_where
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#flatmap_over_map_reduce
- flatmap_over_map_reduce
# Rationale: Encourages using the right API to solve a problem
# https://github.com/realm/SwiftLint/blob/master/Rules.md#for-where
- for_where
# Rationale: Prevents coder error, doesn't crash, makes coder be explicit about their assumptions
# https://github.com/realm/SwiftLint/blob/master/Rules.md#force-cast
- force_cast
# Rationale: Prevents coder error, doesn't crash, makes coder be explicit about their assumptions
# https://github.com/realm/SwiftLint/blob/master/Rules.md#force-try
- force_try
# Rationale: Prevents coder error, doesn't crash, makes coder be explicit about their assumptions
# https://github.com/realm/SwiftLint/blob/master/Rules.md#force-unwrapping
- force_unwrapping
# Rationale: Prevents coder error, doesn't crash, makes coder be explicit about their assumptions
# https://github.com/realm/SwiftLint/blob/master/Rules.md#implicitly-unwrapped-optional
- implicitly_unwrapped_optional
# Rationale: Encourages using the right API to solve a problem
# https://github.com/realm/SwiftLint/blob/master/Rules.md#is-disjoint
- is_disjoint
# Rationale: Provides clarity and consistency by using the default parameter
# https://github.com/realm/SwiftLint/blob/master/Rules.md#joined-default-parameter
- joined_default_parameter
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#last-where
- last_where
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#leading-whitespace
- leading_whitespace
# Rationale: Provides consistency in coding style and follows modern practices of the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#legacy-cggeometry-functions
- legacy_cggeometry_functions
# Rationale: Provides consistency in coding style and follows modern practices of the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#legacy-constant
- legacy_constant
# Rationale: Provides consistency in coding style and follows modern practices of the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#legacy-constructor
- legacy_constructor
# Rationale: Provides consistency in coding style and follows modern practices of the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#legacy-hashing
- legacy_hashing
# Rationale: Provides consistency in coding style and follows modern practices of the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#legacy-nsgeometry-functions
- legacy_nsgeometry_functions
# Rationale: Usage of proper access level
# https://github.com/realm/SwiftLint/blob/master/Rules.md#lower-acl-than-parent
- lower_acl_than_parent
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#mark
- mark
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#multiline-parameters
- multiline_parameters
# Rationale: Clarity of code
# https://github.com/realm/SwiftLint/blob/master/Rules.md#multiple-closures-with-trailing-closure
- multiple_closures_with_trailing_closure
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#no_space_in_method_call
- no_space_in_method_call
# Rationale: Encourages coder best practices though language feature likely makes this obsolete
# https://github.com/realm/SwiftLint/blob/master/Rules.md#multiple-closures-with-trailing-closure
- notification_center_detachment
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#opening-brace-spacing
- opening_brace
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#operator-usage-whitespace
- operator_usage_whitespace
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#operator-function-whitespace
- operator_whitespace
# Rationale: Prevents coder error
# https://github.com/realm/SwiftLint/blob/master/Rules.md#overridden-methods-call-super
- overridden_super_call
# Rationale: Prevents unpredictable behavior
# https://github.com/realm/SwiftLint/blob/master/Rules.md#override-in-extension
- override_in_extension
# Rationale: Promotes consistency and reduces duplication.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#pattern-matching-keywords
- pattern_matching_keywords
# Rationale: UI elements should only be configurable by their owners and not be exposed to others
# https://github.com/realm/SwiftLint/blob/master/Rules.md#private-actions
- private_action
# Rationale: UI elements should only be configurable by their owners and not be exposed to others
# https://github.com/realm/SwiftLint/blob/master/Rules.md#private-outlets
- private_outlet
# Rationale: Keep internal details from being overexposed
# https://github.com/realm/SwiftLint/blob/master/Rules.md#private-over-fileprivate
- private_over_fileprivate
# Rationale: Prevents coder error
# https://github.com/realm/SwiftLint/blob/master/Rules.md#private-unit-test
- private_unit_test
# Rationale: Prevents coder error
# https://github.com/realm/SwiftLint/blob/master/Rules.md#prohibited-calls-to-super
- prohibited_super_call
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#protocol-property-accessors-order
- protocol_property_accessors_order
# Rationale: Provides consistency in coding style and brevity
# https://github.com/realm/SwiftLint/blob/master/Rules.md#redundant-discardable-let
- redundant_discardable_let
# Rationale: Provides consistency in coding style and brevity
# https://github.com/realm/SwiftLint/blob/master/Rules.md#redundant-nil-coalescing
- redundant_nil_coalescing
# Rationale: Provides consistency in coding style and brevity
# https://github.com/realm/SwiftLint/blob/master/Rules.md#redundant-objc-attribute
- redundant_objc_attribute
# Rationale: Provides consistency in coding style and brevity
# https://github.com/realm/SwiftLint/blob/master/Rules.md#redundant-optional-initialization
- redundant_optional_initialization
# Rationale: Provides consistency in coding style and brevity
# https://github.com/realm/SwiftLint/blob/master/Rules.md#redundant-void-return
- redundant_void_return
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#required-enum-case
- required_enum_case
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#returning-whitespace
- return_arrow_whitespace
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#shorthand-operator
- shorthand_operator
# Rationale: There should be only XCTestCase per file
# https://github.com/realm/SwiftLint/blob/master/Rules.md#single-test-class
- single_test_class
# Rationale: Provides consistency and clarity in coding style and is less code
# https://github.com/realm/SwiftLint/blob/master/Rules.md#min-or-max-over-sorted-first-or-last
- sorted_first_last
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#statement-position
- statement_position
# Rationale: Provides cleaniness of code
# https://github.com/realm/SwiftLint/blob/master/Rules.md#superfluous-disable-command
- superfluous_disable_command
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#switch-and-case-statement-alignment
- switch_case_alignment
# Rationale: Provides consistency in coding style and follows modern practices of the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#syntactic-sugar
- syntactic_sugar
# Rationale: Provides consistency in coding style and follows modern practices of the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#trailing-comma
- trailing_comma
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#trailing-newline
- trailing_newline
# Rationale: Provides consistency in coding style and follows modern practices of the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#trailing-semicolon
- trailing_semicolon
# Rationale: Provides consistency in coding style and brevity
# https://github.com/realm/SwiftLint/blob/master/Rules.md#unneeded-break-in-switch
- unneeded_break_in_switch
# Rationale: Provides consistency in coding style and brevity
# https://github.com/realm/SwiftLint/blob/master/Rules.md#unused-control-flow-label
- unused_control_flow_label
# Rationale: Provides consistency in coding style and brevity
# https://github.com/realm/SwiftLint/blob/master/Rules.md#unused-closure-parameter
- unused_closure_parameter
# Rationale: Provides consistency in coding style and brevity
# https://github.com/realm/SwiftLint/blob/master/Rules.md#unused-enumerated
- unused_enumerated
# Rationale: Provides consistency in coding style and brevity
# https://github.com/realm/SwiftLint/blob/master/Rules.md#unused-optional-binding
- unused_optional_binding
# Rationale: Avoids issues where the setter is not using the value passed in.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#unused-setter-value
- unused_setter_value
# Rationale: Prevents coder error
# https://github.com/realm/SwiftLint/blob/master/Rules.md#valid-ibinspectable
- valid_ibinspectable
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#vertical-parameter-alignment
- vertical_parameter_alignment
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#vertical-parameter-alignment-on-call
- vertical_parameter_alignment_on_call
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#vertical-whitespace
- vertical_whitespace
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#vertical-whitespace-before-closing-braces
- vertical_whitespace_closing_braces
# Rationale: Provides consistency in coding style and follows modern practices of the language
# https://github.com/realm/SwiftLint/blob/master/Rules.md#void-return
- void_return
# Rationale: Avoids using weak when it has no effect.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#weak-computed-property
- weak_computed_property
# Rationale: Prevents retain cycles and coder error
# https://github.com/realm/SwiftLint/blob/master/Rules.md#weak-delegate
- weak_delegate
# Rationale: Encourages better documentation
# https://github.com/realm/SwiftLint/blob/master/Rules.md#xctfail-message
- xctfail_message
# Rationale: Provides consistency in coding style
# https://github.com/realm/SwiftLint/blob/master/Rules.md#yoda-condition-rule
- yoda_condition
# Rationale: Encourages documentation
# https://github.com/realm/SwiftLint/blob/master/Rules.md#todo
- custom_todo
# Rationale: Provides consistency in coding style.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#reduce-boolean
- reduce_boolean
# Rationale: == is not used for NSObject comparison, and could lead to confusion.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#nsobject-prefer-isequal
- nsobject_prefer_isequal
# Rationale: Provides consistency of ordering within a type.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#type-contents-order
- type_contents_order
# Rationale: Provides consistency in coding style.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#unused-capture-list
- unused_capture_list
# Rationale: Prevents issues with using unowned.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#unowned-variable-capture
- unowned_variable_capture
# Rationale: Ensures all enums can be switched upon.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#duplicate-enum-cases
- duplicate_enum_cases
# Rationale: Provides consistency in coding style.
# https://github.com/realm/SwiftLint/blob/master/Rules.md#legacy-multiple
- legacy_multiple
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Carthage
- Pods
- .build
attributes:
always_on_same_line:
[
"@IBAction",
"@IBSegueAction",
"@NSManaged",
"@discardableResult",
"@escaping",
"@objc",
]
type_contents_order:
order:
- case
- associated_type
- type_alias
- subtype
- [type_property, instance_property, ib_outlet, ib_inspectable]
- [
initializer,
deinitializer,
type_method,
view_life_cycle_method,
subscript,
other_method,
ib_action,
]
custom_rules:
custom_todo:
name: "TODO Violation"
regex: "(TODO).(?!.*(https&)).(?!.*issue)"
match_kinds: comment
message: "TODOs must include a link to the issue."
severity: warning