-
Notifications
You must be signed in to change notification settings - Fork 1
/
.swiftlint.yml
173 lines (151 loc) · 3.1 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
disabled_rules:
- nesting
- redundant_string_enum_value
- superfluous_disable_command
- todo
- trailing_comma
- type_body_length
opt_in_rules:
- array_init
- closure_end_indentation
- closure_spacing
- 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
- empty_collection_literal
- empty_count
- empty_string
- explicit_enum_raw_value
- explicit_init
- explicit_type_interface
- fatal_error_message
- first_where
- flatmap_over_map_reduce
- force_unwrapping
- identical_operands
- implicit_return
- last_where
- legacy_multiple
- legacy_random
- let_var_whitespace
- literal_expression_end_indentation
- multiline_arguments
- multiline_function_chains
- multiline_literal_brackets
- multiline_parameters
- operator_usage_whitespace
- overridden_super_call
- override_in_extension
- private_action
- private_outlet
- prohibited_super_call
- redundant_nil_coalescing
- sorted_first_last
- strict_fileprivate
- trailing_closure
- multiple_closures_with_trailing_closure
- unneeded_parentheses_in_closure_argument
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- yoda_condition
analyzer_rules:
- unused_import
excluded:
- Carthage
- Pods
- ThirdParty
- Vendor
- Scripts
- Generated
- Example-iOS
force_cast: error
force_try: error
force_unwrapping: error
trailing_whitespace:
ignores_empty_lines: false
severity: warning
trailing_newline: error
trailing_semicolon: error
vertical_whitespace:
max_empty_lines: 1
severity: warning
switch_case_alignment:
indented_cases: false
comma: error
colon:
severity: error
opening_brace:
allow_multiline_func: false
severity: error
legacy_constructor: error
statement_position:
statement_mode: default
severity: error
legacy_constant: error
type_name:
min_length: 3
max_length:
warning: 45
error: 50
excluded:
- T
identifier_name:
max_length:
warning: 40
error: 50
min_length:
error: 3
excluded:
- l
- r
- s
- x
- y
- at
- id
- db
- rs
- to
- in
- me
function_parameter_count:
warning: 10
error: 10
line_length:
warning: 160
error: 160
function_body_length:
warning: 100
error: 200
file_length:
warning: 1000
error: 1000
cyclomatic_complexity:
warning: 20
error: 30
large_tuple:
warning: 4
error: 5
explicit_type_interface:
excluded:
- local
conditional_returns_on_newline:
if_only: true
multiline_arguments:
first_argument_location: next_line
reporter: 'xcode'
custom_rules:
comments_space:
name: 'Space After Comment'
regex: '(^ *//\w+)'
message: 'There should be a space after //'
severity: warning
empty_first_line:
name: 'Empty First Line'
regex: '(^[ a-zA-Z ]*(?:protocol|extension|class|struct|func) [ a-zA-Z0-9:,<>\.\(\)\"-=`]*\{\n( *)?\n)'
message: 'There should not be an empty line after a declaration'
severity: error