-
Notifications
You must be signed in to change notification settings - Fork 7
/
.swiftlint.yml
201 lines (180 loc) · 4.15 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
#
# Software Name: Orange Design System
# SPDX-FileCopyrightText: Copyright (c) Orange SA
# SPDX-License-Identifier: MIT
#
# This software is distributed under the MIT license,
# the text of which is available at https://opensource.org/license/MIT/
# or see the "LICENSE" file for more details.
#
# Authors: See CONTRIBUTORS.txt
# Software description: A SwiftUI components library with code examples for Orange Design System
#
# More details at https://realm.github.io/SwiftLint
# Online validator at https://www.yamllint.com/ (beware of data you copy/paste)
# ========
# Included
# ========
included:
- OrangeDesignSystem
- OrangeDesignSystemDemo/OrangeDesignSystemDemo
- InnovationCupTheme
- OrangeTheme
# ========
# Excluded
# ========
excluded:
- OrangeDesignSystemDemo/OrangeDesignSystemDemo/Resources
- OrangeDesignSystemDemo/Pods
- DerivedData
# ==============
# Disabled rules
# ==============
disabled_rules:
- explicit_type_interface
- extension_access_modifier
- identifier_name
- opening_brace
- strong_iboutlet
- todo
- type_name
- valid_ibinspectable
# =====================================
# Opt-in rules (not enabled by default)
# =====================================
opt_in_rules:
- accessibility_label_for_image
- accessibility_trait_for_button
- anyobject_protocol
- array_init
- attributes
- closure_body_length
- closure_end_indentation
- closure_spacing
- collection_alignment
- conditional_returns_on_newline
- contains_over_first_not_nil
- convenience_type:
severity: error
- discouraged_object_literal
- discouraged_optional_boolean
- discouraged_optional_collection
- empty_count
- empty_string
- empty_xctest_method
- explicit_enum_raw_value
- explicit_init
- explicit_self
- fallthrough
- fatal_error_message
- file_name
- file_types_order
- first_where
- force_unwrapping
- function_default_parameter_at_end
- identical_operands
- implicit_return
- implicitly_unwrapped_optional
- joined_default_parameter
- last_where
- legacy_multiple
- legacy_random
- let_var_whitespace
- literal_expression_end_indentation
- missing_docs
- modifier_order
- multiline_arguments:
severity: error
- multiline_arguments_brackets
- multiline_function_chains:
severity: error
- multiline_literal_brackets
- multiline_parameters
- multiline_parameters_brackets
- nimble_operator
- no_extension_access_modifier
- no_grouping_extension
- nslocalizedstring_key
- nslocalizedstring_require_bundle
- number_separator
- object_literal
- operator_usage_whitespace
- overridden_super_call
- override_in_extension
- pattern_matching_keywords:
severity: error
- prefixed_toplevel_constant
- private_action
- prohibited_super_call
- reduce_into
- redundant_nil_coalescing
- redundant_type_annotation
- redundant_string_enum_value
- required_deinit
- required_enum_case
- single_test_class
- sorted_first_last
- sorted_imports
- static_operator
- strict_fileprivate:
severity: error
- strong_iboutlet
- switch_case_alignment
- switch_case_on_newline
- syntactic_sugar:
severity: error
- toggle_bool
- trailing_closure:
only_single_muted_parameter: true
- trailing_newline:
severity: error
- trailing_whitespace
- type_body_length
- type_contents_order
- unavailable_function
- unneeded_parentheses_in_closure_argument
- unowned_variable_capture
- untyped_error_in_catch
- unused_import
- unused_optional_binding
- vertical_parameter_alignment:
severity: error
- vertical_parameter_alignment_on_call:
severity: error
- vertical_whitespace_between_cases
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- weak_delegate:
severity: error
- yoda_condition
# ================================
# Other rules (enabled by default)
# ================================
control_statement:
severity: error
cyclomatic_complexity:
warning: 10
error: 20
ignores_case_statements: true
file_length:
warning: 800
error: 1000
force_cast:
severity: error
function_body_length:
warning: 50
error: 100
function_parameter_count:
warning: 6
error: 8
implicit_getter:
severity: error
large_tuple:
warning: 3
error: 4
line_length:
warning: 180
error: 200
trailing_comma:
mandatory_comma: true
type_body_length: 250