-
-
Notifications
You must be signed in to change notification settings - Fork 142
Expand file tree
/
Copy path.swiftlint.yml
More file actions
181 lines (161 loc) · 3.24 KB
/
.swiftlint.yml
File metadata and controls
181 lines (161 loc) · 3.24 KB
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
# SwiftLint configuration
# https://github.com/realm/SwiftLint
# Paths to include during linting
included:
- TablePro
# Paths to exclude during linting
excluded:
- DerivedData
- .build
- Packages
- Pods
- Carthage
- vendor
# Enabled rules (beyond default)
opt_in_rules:
- closure_end_indentation
- collection_alignment
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- discouraged_object_literal
- empty_collection_literal
- empty_count
- explicit_init
- extension_access_modifier
- fallthrough
- fatal_error_message
- file_header
- file_name_no_space
- first_where
- flatmap_over_map_reduce
- force_unwrapping
- identical_operands
- implicit_return
- joined_default_parameter
- last_where
- legacy_random
- literal_expression_end_indentation
- lower_acl_than_parent
- modifier_order
- nimble_operator
- nslocalizedstring_key
- number_separator
- object_literal
- operator_usage_whitespace
- overridden_super_call
- prefer_self_type_over_type_of_self
- prefer_zero_over_explicit_init
- private_action
- private_outlet
- prohibited_super_call
- quick_discouraged_call
- quick_discouraged_focused_test
- quick_discouraged_pending_test
- reduce_into
- redundant_type_annotation
- required_enum_case
- single_test_class
- sorted_first_last
- sorted_imports
- static_operator
- strong_iboutlet
- toggle_bool
- unneeded_parentheses_in_closure_argument
- unowned_variable_capture
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- xct_specific_matcher
- yoda_condition
# Disabled rules
disabled_rules:
- trailing_comma
- todo
- opening_brace
- trailing_closure
- closure_spacing
- multiple_closures_with_trailing_closure
- for_where
- redundant_string_enum_value
- is_disjoint
- static_over_final_class
- force_try
# Rule configurations
line_length:
warning: 180
error: 300
ignores_urls: true
ignores_function_declarations: true
ignores_comments: true
ignores_interpolated_strings: true
type_body_length:
warning: 1100
error: 1500
file_length:
warning: 1200
error: 1800
ignore_comment_only_lines: true
function_body_length:
warning: 160
error: 250
function_parameter_count:
warning: 10
error: 15
type_name:
min_length: 2
max_length: 50
identifier_name:
min_length:
warning: 1
error: 0
max_length:
warning: 80
error: 100
validates_start_with_lowercase: error
excluded:
- id
- x
- y
- i
- j
- k
- db
- to
- at
- by
- up
- on
- xc
- uc
- lc
- TableProDir
- SQLITE_TRANSIENT
- protocol_tcp
- where_
- TableProTabSmart
- x86_64
nesting:
type_level:
warning: 3
function_level:
warning: 5
cyclomatic_complexity:
warning: 40
error: 60
ignores_case_statements: true
large_tuple:
warning: 4
error: 5
vertical_whitespace:
max_empty_lines: 2
force_cast: warning
force_unwrapping: warning
trailing_whitespace:
ignores_empty_lines: true
ignores_comments: true
colon:
apply_to_dictionaries: true
comma: warning
# No print statements is now disabled - use Logger in the future
custom_rules: {}