-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.swiftlint.yml
executable file
·87 lines (79 loc) · 2.07 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
excluded:
- TaskForce-UIKit/Generated
opt_in_rules:
- anyobject_protocol
- 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
- convenience_type
- empty_collection_literal
- empty_count
- empty_string
- empty_xctest_method
- explicit_init
- fatal_error_message
- file_name
- file_name_no_space
- first_where
- force_unwrapping
- indentation_width
- last_where
- literal_expression_end_indentation
- modifier_order
- multiline_arguments
- multiline_arguments_brackets
- multiline_function_chains
- multiline_literal_brackets
- multiline_parameters
- multiline_parameters_brackets
- operator_usage_whitespace
- overridden_super_call
- prefer_zero_over_explicit_init
- private_action
- private_outlet
- private_subject
- prohibited_interface_builder
- toggle_bool
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- unneeded_parentheses_in_closure_argument
- unowned_variable_capture
- unused_capture_list
- unused_import
- weak_delegate
cyclomatic_complexity:
warning: 10
error: 20
function_body_length:
warning: 50
error: 100
line_length:
error: 120
ignores_comments: true
ignores_interpolated_strings: true
ignores_function_declarations: false
ignores_urls: true
identifier_name:
excluded:
- id
file_length:
warning: 500
error: 1000
nesting:
type_level: 2
custom_rules:
marks_style:
name: "Mark Style"
regex: '// MARK:(?!\s-\s\w+?)'
message: "Marks should follow the following structure: `// MARK: - Topic`."
severity: warning
final_class:
name: "Final Class"
regex: '(?<!final\s)class(?!\s(func|var))(?=[^\{\n]*[\{])'
message: "Mark class as final. Or disable the rule."
severity: error