-
Notifications
You must be signed in to change notification settings - Fork 0
/
.swiftlint.yml
97 lines (84 loc) · 2.24 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
swiftlint_version: 0.43.1
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Pods
- DerivedData
analyzer_rules: # Rules run by `swiftlint analyze` (experimental)
- unused_declaration
- unused_import
deployment_target:
iOS_deployment_target: 10.0
closure_body_length:
warning: 30
error: 30
identifier_name:
max_length: 150
file_length:
warning: 1500
error: 1500
#ignore_comment_only_lines: true
function_body_length:
warning: 200
error: 200
function_parameter_count:
warning: 8
error: 8
line_length:
warning: 1000
error: 1000
type_body_length:
warning: 1000
error: 1000
type_name:
max_length: 150
cyclomatic_complexity:
warning: 30
error: 30
opt_in_rules:
- closure_body_length
# - closure_end_indentation # disabled, because xcode's block indentation depends on `[weak self]`
- closure_spacing
- contains_over_filter_count
- contains_over_filter_is_empty
- discouraged_optional_boolean
- duplicate_imports
- empty_collection_literal
- empty_count
- empty_string
- explicit_init
- fatal_error_message
# - file_name # disabled, because results are not consistent
# - file_header
- first_where
- force_unwrapping
- identical_operands
# - indentation_width # disabled, because multiline arguments are not recognized properly
- inert_defer
- last_where
- legacy_random
- let_var_whitespace
# - multiline_arguments
- multiline_parameters
- multiple_closures_with_trailing_closure
- no_space_in_method_call
# - object_literal
- operator_usage_whitespace
- optional_enum_case_matching
- prefer_self_type_over_type_of_self
- prefixed_toplevel_constant
- private_action
- private_over_fileprivate
- prohibited_super_call
- reduce_into
- redundant_nil_coalescing
- single_test_class
- sorted_first_last
# - sorted_imports
- strict_fileprivate
- strong_iboutlet
- toggle_bool
# - type_contents_order # https://realm.github.io/SwiftLint/type_contents_order.html
# - trailing_closure
- unowned_variable_capture
- unused_setter_value
- vertical_parameter_alignment_on_call
- yoda_condition