-
Notifications
You must be signed in to change notification settings - Fork 19
/
.swiftlint.yml
73 lines (65 loc) · 1.94 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
opt_in_rules:
- empty_string
disabled_rules:
- unused_closure_parameter
- trailing_comma
- line_length
- trailing_newline
- todo
- file_length
- force_try
- force_cast
- function_body_length
- function_parameter_count
- large_tuple
- type_body_length
- type_name # allow any length
- cyclomatic_complexity # allow complex if/switch/for
- identifier_name # allow `_`-prefixed variable name
- nesting # allow multiple type nesting
- weak_delegate # delegate may be a separated class that needs to be retained by core class.
- colon
- multiple_closures_with_trailing_closure
- private_over_fileprivate
- fallthrough
# TODO: enable this
- vertical_parameter_alignment
- redundant_string_enum_value
- legacy_constructor
- implicit_getter
- syntactic_sugar
- for_where
included:
- Targets
excluded:
- Targets/UseCaseInterface/UseCaseInterface/Sources/Generated
- Targets/Domain/Domain/Sources/Generated
- Targets/UILogicInterface/UILogicInterface/Sources/Generated
custom_rules:
const_declare_use_enum:
name: "Use enum instead of struct."
regex: 'struct\sConst\w*'
message: "Use enum Const instead, if you want to declare constant values."
severity: warning
match_kinds: identifier
constants_declare_use_const:
name: "Rename Constant[s] to Const."
regex: '(enum|struct)\sConst\w+'
message: "Use Const instead of Constants and Constant."
severity: warning
match_kinds: identifier
function_argument_label_spacing:
name: "Add white space."
regex: '\([^:\[\)]+:[^\s\):]+\)'
message: "White space should be next to the colon of function argument label."
severity: warning
match_kinds:
- identifier
- keyword
- number
subscribe_use_subscribe_on_next:
name: "Use subscribe(onNext:)."
regex: 'bind\(onNext:\s+'
message: "Use subscribe(onNext:), if you want to subscribe the stream."
severity: warning
match_kinds: identifier