forked from MochiDiffusion/MochiDiffusion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.swiftlint.yml
187 lines (187 loc) · 4.75 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
disabled_rules:
- file_length
- function_body_length
- function_parameter_count
- line_length
- type_body_length
opt_in_rules:
- accessibility_trait_for_button
- closure_end_indentation
- closure_spacing
- collection_alignment
- discouraged_assert
- discouraged_object_literal
- discouraged_optional_boolean
- discouraged_optional_collection
- empty_collection_literal
- empty_count
- empty_string
- explicit_init
- file_name_no_space
- file_types_order
- identical_operands
- implicit_return
- implicitly_unwrapped_optional
- indentation_width
- let_var_whitespace
- literal_expression_end_indentation
- lower_acl_than_parent
- modifier_order
- multiline_arguments
- multiline_arguments_brackets
- multiline_function_chains
- multiline_literal_brackets
- multiline_parameters
- multiline_parameters_brackets
- nimble_operator
- number_separator
- operator_usage_whitespace
- redundant_nil_coalescing
- redundant_type_annotation
- sorted_imports
- switch_case_on_newline
- trailing_closure
- unowned_variable_capture
- yoda_condition
class_delegate_protocol: error
closing_brace: error
closure_end_indentation: error
closure_parameter_position: error
closure_spacing: error
collection_alignment:
severity: error
colon:
severity: error
comma: error
comment_spacing: error
compiler_protocol_init: error
computed_accessors_order:
severity: error
control_statement: error
discouraged_assert: error
discouraged_direct_init:
severity: error
discouraged_object_literal:
severity: error
discouraged_optional_boolean: error
discouraged_optional_collection: error
duplicate_enum_cases: error
duplicate_imports: error
duplicated_key_in_dictionary_literal: error
dynamic_inline: error
empty_collection_literal: error
empty_count:
severity: error
empty_enum_arguments: error
empty_parameters: error
empty_parentheses_with_trailing_closure: error
empty_string: error
explicit_init: error
file_name_no_space:
severity: error
file_types_order:
severity: error
force_cast: warning
force_try: error
identical_operands: error
identifier_name:
min_length:
warning: 1
implicit_getter: error
implicit_return:
severity: error
implicitly_unwrapped_optional:
severity: error
indentation_width:
severity: error
include_comments: false
is_disjoint: error
leading_whitespace: error
legacy_cggeometry_functions: error
legacy_constant: error
legacy_constructor: error
legacy_hashing: error
legacy_nsgeometry_functions: error
legacy_random: error
let_var_whitespace: error
literal_expression_end_indentation: error
lower_acl_than_parent: error
mark: error
modifier_order:
severity: error
multiline_arguments:
severity: error
multiline_arguments_brackets: error
multiline_function_chains: error
multiline_literal_brackets: error
multiline_parameters:
severity: error
multiline_parameters_brackets: error
multiple_closures_with_trailing_closure: error
nimble_operator: error
no_fallthrough_only: error
no_space_in_method_call: error
notification_center_detachment: error
ns_number_init_as_function_reference: error
nsobject_prefer_isequal: error
number_separator:
severity: error
opening_brace:
severity: error
operator_usage_whitespace:
severity: error
operator_whitespace: error
orphaned_doc_comment: error
private_over_fileprivate:
severity: error
protocol_property_accessors_order: error
reduce_boolean: error
redundant_nil_coalescing: error
redundant_optional_initialization: error
redundant_set_access_control: error
redundant_string_enum_value: error
redundant_type_annotation: error
redundant_void_return: error
return_arrow_whitespace: error
self_in_property_initialization: error
shorthand_operator: error
sorted_imports:
severity: error
statement_position:
severity: error
switch_case_alignment:
severity: error
switch_case_on_newline: error
syntactic_sugar: error
trailing_closure:
severity: error
trailing_newline: error
trailing_semicolon: error
trailing_whitespace:
severity: error
ignores_comments: false
unavailable_condition: error
unneeded_break_in_switch: error
unowned_variable_capture: error
unused_closure_parameter: error
unused_control_flow_label: error
unused_enumerated: error
unused_optional_binding:
severity: error
unused_setter_value: error
vertical_parameter_alignment: error
vertical_whitespace:
severity: error
void_function_in_ternary: error
void_return: error
yoda_condition: error
custom_rules:
swiftui_state_private:
regex: '@(State|StateObject|EnvironmentObject)\s+var'
message: 'SwiftUI @State/@StateObject/@EnvironmentObject properties should be private'
swiftui_environment_private:
regex: '@Environment\(\\\.\w+\)\s+var'
message: 'SwiftUI @Environment properties should be private'
no_alignment_center:
regex: '\b\(alignment: .center\b'
message: 'This alignment is the default.'