-
Notifications
You must be signed in to change notification settings - Fork 0
/
.swiftlint.yml
86 lines (75 loc) · 1.64 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
# You can find the documentation here :
# https://realm.github.io/SwiftLint/rule-directory.html
excluded:
- Carthage
- Pods
analyzer_rules:
- explicit_self
- unused_import
- unused_declaration
opt_in_rules:
- array_init
- closure_end_indentation
- closure_spacing
- collection_alignment
- contains_over_filter_count
- contains_over_filter_is_empty
- discouraged_object_literal
- discouraged_optional_boolean
- empty_collection_literal
- empty_count
- fatal_error_message
- file_name_no_space
- first_where
- force_unwrapping
- function_default_parameter_at_end
- identical_operands
- last_where
- let_var_whitespace
- literal_expression_end_indentation
- modifier_order
- multiline_arguments
- multiline_literal_brackets
- multiline_parameters
- number_separator
- operator_usage_whitespace
- reduce_into
- redundant_nil_coalescing
- redundant_type_annotation
- toggle_bool
- trailing_closure
- unneeded_parentheses_in_closure_argument
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
# Custom rules
file_length:
warning: 500
error: 1200
force_cast: warning
force_try: warning
identifier_name:
min_length:
warning: 2
excluded:
- id
- URL
- GlobalAPIKey
allowed_symbols: ["_"]
line_length:
ignores_urls: true
ignores_comments: true
trailing_closure:
only_single_muted_parameter: true
trailing_whitespace:
ignores_empty_lines: true
type_body_length:
warning: 300
error: 400
type_name:
min_length: 4
max_length:
warning: 40
error: 50
excluded: iPhone
allowed_symbols: ["_"]