forked from kodecocodes/swift-style-guide
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.swiftlint.yml
228 lines (226 loc) · 4.52 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
disabled_rules:
- dynamic_inline
- private_unit_test
- type_body_length
- valid_ibinspectable
- strict_fileprivate
- function_default_parameter_at_end
- multiline_function_chains
- force_unwrapping
- type_name
opt_in_rules:
- closure_spacing
- convenience_type
- discouraged_object_literal
- empty_string
- fallthrough
- fatal_error_message
- first_where
- multiline_arguments
- multiline_parameters
- overridden_super_call
- override_in_extension
- required_enum_case
- vertical_parameter_alignment_on_call
- yoda_condition
- array_init
- explicit_init
- function_default_parameter_at_end
- redundant_nil_coalescing
- closure_body_length
- collection_alignment
- conditional_returns_on_newline -
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- discouraged_optional_boolean
- empty_collection_literal
- empty_count
- enum_case_associated_values_count (3e)
- file_name_no_space
- flatmap_over_map_reduce
- identical_operands
- joined_default_parameter
- last_where
- literal_expression_end_indentation
- no_extension_access_modifier
- nslocalizedstring_key
- operator_usage_whitespace
- pattern_matching_keywords
- private_action
- private_outlet
- prohibited_super_call
- reduce_into
- redundant_type_annotation
- sorted_first_last
- static_operator
- toggle_bool
- unavailable_function
- unneeded_parentheses_in_closure_argument
- unused_declaration
- unused_import
- vertical_whitespace_closing_braces
excluded:
- Pods
- ios-dependencies
- UI/UITests
- App/AppTests
- UIComponentKit/UIComponentKitTests
- Common/CommonTests
- Domain/DomainTests
- Data/DataTests
- UI/Resources
- Frameworks
- Carthage
- Scripts
- node_modules
attributes:
severity: error
closing_brace:
severity: error
closure_body_length:
- 30 #warning
- 40 #error
closure_end_indentation:
severity: error
colon:
severity: error
flexible_right_spacing: false
apply_to_dictionaries: true
comma:
severity: error
conditional_returns_on_newline:
severity: error
control_statement:
severity: error
cyclomatic_complexity:
- 7 #warning
- 8 #error
empty_count:
severity: error
empty_parameters:
severity: error
explicit_init:
severity: error
file_length:
- 300 #warning
- 500 #error
force_cast:
severity: error
force_try:
severity: error
force_unwrapping:
severity: error
function_body_length:
- 50 #warning
- 70 #error
function_parameter_count:
- 5 #warning
- 6 #error
implicit_getter:
severity: error
large_tuple:
- 3 #warning
- 5 #error
leading_whitespace:
severity: error
legacy_cggeometry_functions:
severity: error
legacy_constant:
severity: error
legacy_constructor:
severity: error
legacy_nsgeometry_functions:
severity: error
line_length:
ignores_comments: true
warning: 120
error: 120
mark:
severity: error
nesting:
severity: error
nimble_operator:
severity: error
opening_brace:
severity: error
operator_usage_whitespace:
severity: error
operator_whitespace:
severity: error
overridden_super_call:
severity: error
redundant_nil_coalescing:
severity: error
redundant_optional_initialization:
severity: error
redundant_string_enum_value:
severity: error
redundant_void_return:
severity: error
return_arrow_whitespace:
severity: error
switch_case_on_newline:
severity: error
syntactic_sugar:
severity: error
todo:
severity: warning
trailing_comma:
severity: error
trailing_newline:
severity: error
trailing_semicolon:
severity: error
trailing_whitespace:
severity: error
type_name:
severity: error
unused_closure_parameter:
severity: error
identifier_name:
min_length: 2
severity: error
vertical_parameter_alignment:
severity: error
vertical_whitespace:
severity: error
void_return:
severity: error
weak_delegate:
severity: error
lower_acl_than_parent:
severity: error
first_where:
severity: error
private_action:
severity: error
private_outlet:
severity: error
closure_spacing:
severity: error
multiline_function_chains:
severity: error
array_init:
severity: error
statement_position:
severity: error
unused_enumerated:
severity: error
vertical_parameter_alignment_on_call:
severity: error
strict_fileprivate:
severity: warning
empty_string:
severity: error
empty_count:
severity: error
unneeded_break_in_switch:
severity: error
fatal_error_message:
severity: error
empty_parentheses_with_trailing_closure:
severity: error
contains_over_first_not_nil:
severity: error