forked from OpenCombine/OpenCombine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.swiftlint.yml
118 lines (107 loc) · 2.66 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
114
115
116
117
118
included:
- Sources
- Tests
child_config: Tests/.swiftlint.yml
disabled_rules:
- blanket_disable_command
- block_based_kvo
- class_delegate_protocol
- colon
- cyclomatic_complexity
- file_length
- force_cast
- force_try
- force_unwrapping
- function_body_length
- function_parameter_count
- identifier_name
- nesting
- notification_center_detachment
- no_fallthrough_only
- no_space_in_method_call
- redundant_string_enum_value
- todo
- trailing_comma
- type_body_length
- opening_brace
- untyped_error_in_catch
opt_in_rules:
- array_init
- attributes
- closure_end_indentation
- closure_spacing
- contains_over_first_not_nil
- convenience_type
- empty_string
- empty_xctest_method
- explicit_acl
- explicit_enum_raw_value
- explicit_init
- explicit_top_level_acl
- first_where
- generic_type_name
- identical_operands
- implicit_return
- implicitly_unwrapped_optional
- last_where
- legacy_multiple
- legacy_random
- let_var_whitespace
- literal_expression_end_indentation
- lower_acl_than_parent
- modifier_order
- multiline_arguments
- no_extension_access_modifier
- override_in_extension
- pattern_matching_keywords
- redundant_nil_coalescing
- sorted_first_last
- sorted_imports
- switch_case_on_newline
- toggle_bool
- unneeded_parentheses_in_closure_argument
- untyped_error_in_catch
- unused_import
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- yoda_condition
implicit_return:
included:
- closure
line_length:
warning: 90
error: 120
ignores_urls: true
generic_type_name:
min_length: 3
attributes:
always_on_line_above:
- "@usableFromInline"
custom_rules:
no_foundation_dependency:
included: Sources/OpenCombine/
name: "No Foundation Dependency"
regex: "^import.*Foundation.*$"
message: "We don't want to depend on Foundation"
severity: error
no_dispatch_dependency:
included: Sources/OpenCombine/
name: "No Dispatch Dependency"
regex: "^import.*Dispatch.*$"
message: "We don't want to depend on Dispatch"
severity: error
inheritance_colon:
name: "Inheritance Colon"
regex: '\s[A-Z_]\w*(<[\w\s:\.,]+>)?(?: +:\s*|:(?:\s{0}|\s{2,}))([\[|\(]*\S)'
message: "Colons should be next to the identifier of the inheriting type"
severity: warning
match_kinds:
- identifier
- typeidentifier
dictionary_type_colon:
name: "Dictionary Type Colon"
regex: '\[\w+(?:(?:\s{0}|\s{2,}):| :(?:\s{0}|\s{2,})\w)'
message: "Colon should be surrounded by a single whitespace in a dictionary literal"
severity: warning
match_kinds:
- typeidentifier