-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy path.swiftlint.yml
113 lines (99 loc) · 2.33 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
analyzer_rules:
- typesafe_array_init
- unused_declaration
- unused_import
opt_in_rules:
# - accessibility_label_for_image # TODO: enable later
# - accessibility_trait_for_button # TODO: enable later
- closure_body_length
- closure_end_indentation
- closure_spacing
- collection_alignment
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- convenience_type
# - discouraged_object_literal
- empty_collection_literal
- empty_count
- empty_string
- enum_case_associated_values_count
# - explicit_init
- extension_access_modifier
# - fatal_error_message
# - file_name
- file_name_no_space
# - file_types_order
- first_where
- flatmap_over_map_reduce
- force_unwrapping
# - identical_operands
- implicitly_unwrapped_optional
- last_where
- literal_expression_end_indentation
- lower_acl_than_parent
# - missing_docs
- modifier_order
# - multiline_arguments
- multiline_function_chains
- multiline_literal_brackets
- multiline_parameters
# - number_separator
- operator_usage_whitespace
# - overridden_super_call
- prefer_self_type_over_type_of_self
- reduce_into
- redundant_nil_coalescing
- redundant_type_annotation
- return_value_from_void_function
- sorted_first_last
- sorted_imports
- static_operator
- toggle_bool
# - type_contents_order
- unneeded_parentheses_in_closure_argument
- unowned_variable_capture
# - vertical_parameter_alignment_on_call
# - vertical_whitespace_closing_braces
# - vertical_whitespace_opening_braces
# - weak_delegate
- yoda_condition
disabled_rules:
- identifier_name
- inclusive_language
- multiple_closures_with_trailing_closure
- redundant_string_enum_value
- type_name
# Custom rules
custom_rules:
indentation_style:
name: "Indentation Style"
regex: "^ {2,4}"
message: "Use tabs, not spaces"
# Rule config
closure_body_length:
warning: 90
error: 120
cyclomatic_complexity:
ignores_case_statements: true
file_length:
warning: 500
error: 700
function_body_length:
warning: 80
error: 100
large_tuple:
warning: 3
error: 5
line_length:
warning: 180
error: 220
nesting:
type_level: 3
function_level: 2
switch_case_alignment:
indented_cases: false
type_body_length:
warning: 400
error: 500