-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.swiftlint.yml
251 lines (176 loc) · 6 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
disabled_rules:
- line_length
- block_based_kvo
- identifier_name
- class_delegate_protocol
- todo
- weak_delegate
- multiple_closures_with_trailing_closure
- large_tuple
- pattern_matching_keywords
- conditional_returns_on_newline
# paths to ignore during linting. overridden by `included`.
excluded:
- Pods
- External
- Submodules
- PintAR/R.generated.swift
- derivedData
opt_in_rules:
- empty_parentheses_with_trailing_closure
- mark
- force_unwrapping
- force_try
- force_cast
# When using map, we think of it being used to transform a current array into something else
- array_init
# Provides consistency in coding style
- closure_spacing
# Encourages usage of assertion failures and thinking about what you are returning
- conditional_returns_on_newline
# A more clear and consise way to check if something exists
- contains_over_first_not_nil
# A nil bool is a tri -state variable which can be modeled more clearly
- discouraged_optional_boolean
# Provides consistency in coding style and follows modern practices of the language
- empty_count
# Provides consistency in coding style and follows modern practices of the language
- empty_string
# Provides consistency in coding style
- explicit_init
# Prevents coder error
- fallthrough
# Encourages better documentation
- fatal_error_message
# Encourages using the right API to solve a problem
- first_where
# Prevents coder error, doesn't crash, makes coder be explicit about their assumptions
- implicitly_unwrapped_optional
# Provides clarity and consistency by using the default parameter
- joined_default_parameter
# Provides consistency in coding style
- last_where
# Usage of proper access level
- lower_acl_than_parent
# Provides consistency in coding style
- multiline_parameters
# Encourages coder best practices though language feature likely makes this obsolete
- notification_center_detachment
# Provides consistency in coding style
- opening_brace
# Provides consistency in coding style
- operator_usage_whitespace
# Provides consistency in coding style
- operator_whitespace
# Prevents coder error
- overridden_super_call
# Prevents unpredictable behavior
- override_in_extension
# Promotes consistency and reduces duplication.
- pattern_matching_keywords
# UI elements should only be configurable by their owners and not be exposed to others
- private_action
# UI elements should only be configurable by their owners and not be exposed to others
- private_outlet
# Keep internal details from being overexposed
- private_over_fileprivate
# Prevents coder error
- private_unit_test
# Prevents coder error
- prohibited_super_call
# Provides consistency in coding style
- protocol_property_accessors_order
# Provides consistency in coding style and brevity
- redundant_discardable_let
# Provides consistency in coding style and brevity
- redundant_nil_coalescing
# Provides consistency in coding style and brevity
- redundant_objc_attribute
# Provides consistency in coding style and brevity
- redundant_optional_initialization
# Provides consistency in coding style and brevity
- redundant_void_return
# Provides consistency in coding style
- required_enum_case
# Provides consistency in coding style
- return_arrow_whitespace
# Provides consistency in coding style
- shorthand_operator
# There should be only XCTestCase per file
- single_test_class
# Provides consistency and clarity in coding style and is less code
- sorted_first_last
# Provides consistency in coding style
- statement_position
# Provides cleaniness of code
- superfluous_disable_command
# Provides consistency in coding style
- switch_case_alignment
# Provides consistency in coding style and follows modern practices of the language
- syntactic_sugar
# Provides consistency in coding style and follows modern practices of the language
- trailing_comma
# Provides consistency in coding style
- trailing_newline
# Provides consistency in coding style and follows modern practices of the language
- trailing_semicolon
# Provides consistency in coding style and brevity
- unneeded_break_in_switch
# Provides consistency in coding style and brevity
- unused_control_flow_label
# Provides consistency in coding style and brevity
- unused_closure_parameter
# Provides consistency in coding style and brevity
- unused_enumerated
# Provides consistency in coding style and brevity
- unused_optional_binding
# Avoids issues where the setter is not using the value passed in.
- unused_setter_value
# Prevents coder error
- valid_ibinspectable
# Provides consistency in coding style
- vertical_parameter_alignment
# Provides consistency in coding style
- vertical_parameter_alignment_on_call
# Provides consistency in coding style
- vertical_whitespace
# Provides consistency in coding style
- vertical_whitespace_closing_braces
# Provides consistency in coding style and follows modern practices of the language
- void_return
# Prevents retain cycles and coder error
- weak_delegate
# Encourages better documentation
- xctfail_message
# Provides consistency in coding style
- yoda_condition
# Provides consistency in coding style.
- reduce_boolean
# == is not used for NSObject comparison, and could lead to confusion.
- nsobject_prefer_isequal
# Provides consistency in coding style.
- unused_capture_list
# Prevents issues with using unowned.
- unowned_variable_capture
# Ensures all enums can be switched upon.
- duplicate_enum_cases
# Provides consistency in coding style.
- legacy_multiple
- convenience_type
- modifier_order
- toggle_bool
- identical_operands
force_unwrapping:
severity: error
force_cast:
severity: error
force_try:
severity: error
file_length:
warning: 600
error: 800
ignore_comment_only_lines: true
cyclomatic_complexity:
ignores_case_statements: true
warning: 10
error: 20