-
Notifications
You must be signed in to change notification settings - Fork 2
/
.swiftlint.yml
executable file
·188 lines (159 loc) · 3.69 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
indentation: 4
disabled_rules: # rule identifiers to exclude from running
- trailing_whitespace
- conditional_returns_on_newline
- private_outlet
- switch_case_on_newline
- redundant_optional_initialization
- sorted_imports
- shorthand_operator
- explicit_type_interface
- file_header
- notification_center_detachment
- number_separator
- empty_enum_arguments
- empty_parentheses_with_trailing_closure
- private_over_fileprivate
- identifier_name
- todo
- type_name # desn't make much sense to limit ourselfs
- nesting
- orphaned_doc_comment
- multiple_closures_with_trailing_closure
opt_in_rules:
- closure_spacing
- contains_over_first_not_nil
- explicit_init
- force_unwrapping
- literal_expression_end_indentation
- overridden_super_call
- redundant_nil_coalescing
# - attributes
- closure_end_indentation
- first_where
- operator_whitespace
- operator_usage_whitespace
- fatal_error_message
- implicitly_unwrapped_optional
- multiline_arguments
- multiline_parameters
- empty_count
- unneeded_parentheses_in_closure_argument
- vertical_parameter_alignment_on_call
- fallthrough
- attributes
excluded:
- Pods
- XTouchBarTests
- XTouchBar/Keys/Key.swift
- XTouchBar/TouchBarSupport/NSTouchbarSupport.swift
- XTouchBar/Keys/Shortcut.swift
- XTouchBar/Shortcut/Shortcut+Instances.swift
custom_rules:
maximum_one_space:
name: "Maximum one space"
regex: "\\s(var|let)\\s{2,}"
severity: error
attributes:
severity: error
class_delegate_protocol: error
compiler_protocol_init: error
closure_end_indentation: error
closure_parameter_position: error
closing_brace: error
closure_spacing: error
colon:
severity: error
comma: error
conditional_returns_on_newline:
severity: error
contains_over_first_not_nil: error
control_statement: error
discarded_notification_center_observer: error
empty_count: error
empty_parameters: error
explicit_init: error
fallthrough: error
fatal_error_message: error
first_where: error
force_cast: error
force_try: error
force_unwrapping: error
for_where: error
implicit_getter: error
implicitly_unwrapped_optional:
severity: error
large_tuple:
warning: 3
error: 3
leading_whitespace: error
legacy_cggeometry_functions: error
legacy_constant: error
legacy_constructor: error
legacy_nsgeometry_functions: error
literal_expression_end_indentation: error
mark: error
multiline_arguments:
severity: error
multiline_parameters:
severity: error
opening_brace: error
operator_whitespace: error
operator_usage_whitespace: error
overridden_super_call:
severity: error
protocol_property_accessors_order: error
redundant_nil_coalescing:
severity: error
redundant_void_return: error
return_arrow_whitespace: error
redundant_string_enum_value: error
redundant_discardable_let: error
statement_position:
severity: error
switch_case_alignment:
severity: error
syntactic_sugar: error
trailing_newline: error
trailing_semicolon: error
trailing_comma:
severity: error
unneeded_parentheses_in_closure_argument: error
unneeded_break_in_switch:
severity: error
unused_closure_parameter: error
unused_enumerated: error
unused_optional_binding:
severity: error
valid_ibinspectable: error
void_return: error
vertical_parameter_alignment: error
vertical_parameter_alignment_on_call: error
vertical_whitespace:
severity: error
weak_delegate: error
cyclomatic_complexity:
warning: 15
error: 15
file_length:
warning: 10000
error: 30000
function_body_length:
warning: 50
error: 50
function_parameter_count:
warning: 10
error: 10
line_length:
warning: 150
error: 150
type_body_length:
warning: 5000
error: 9000
identifier_name:
min_length:
warning: 0
error: 0
max_length:
warning: 50
error: 50