-
Notifications
You must be signed in to change notification settings - Fork 8
/
.swiftlint.yml
126 lines (115 loc) · 2.58 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
119
120
121
122
123
124
125
126
identifier_name:
min_length:
warning: 2
error: 2
max_length:
warning: 50
error: 60
type_name:
min_length:
warning: 2
error: 2
max_length:
warning: 50
error: 50
line_length:
warning: 120
ignores_comments: true
type_body_length:
warning: 100
error: 200
trailing_whitespace:
ignores_empty_lines: true
cyclomatic_complexity:
warning: 15
private_outlet:
allow_private_set: true
trailing_closure:
only_single_muted_parameter: true
implicit_return:
included:
- closure
opt_in_rules:
- anyobject_protocol
- array_init
- attributes
- closure_body_length
- closure_end_indentation
- closure_spacing
- collection_alignment
- contains_over_first_not_nil
- conditional_returns_on_newline
- discouraged_object_literal
- discouraged_optional_boolean
- empty_count
- empty_string
- empty_xctest_method
- explicit_init
- fallthrough
- fatal_error_message
- first_where
- force_unwrapping
- function_default_parameter_at_end
- identical_operands
- implicit_return
- joined_default_parameter
- let_var_whitespace
- literal_expression_end_indentation
- legacy_random
- lower_acl_than_parent
- modifier_order
- multiline_arguments
- multiline_parameters
- nimble_operator
- operator_usage_whitespace
- overridden_super_call
- pattern_matching_keywords
- private_action
- private_outlet
- prohibited_super_call
- redundant_nil_coalescing
- redundant_type_annotation
- single_test_class
- sorted_first_last
- sorted_imports
- static_operator
- strict_fileprivate
- strong_iboutlet
- switch_case_on_newline
- toggle_bool
- trailing_closure
- unavailable_function
- unneeded_parentheses_in_closure_argument
- unused_import
- unused_private_declaration
- vertical_parameter_alignment_on_call
- yoda_condition
excluded:
- .git
- .build
- .swiftpm
- Pods
- Carthage
custom_rules:
tabs:
name: "Tabs"
regex: "\t"
message: "Avoid using tabs."
public_extension:
name: "Public Extension"
regex: "public extension"
message: "Avoid using public extensions."
fileprivate_extension:
name: "Fileprivate Extension"
regex: "fileprivate extension"
message: "Use private extensions instead of fileprivate."
leading_space_in_comment:
name: "Whitespace After Slash Comments"
regex: "[^:]//[^\\s]"
message: "Leading space should be added to comments"
match_kinds:
- comment
one_assignment_space:
name: "One Assignment Space"
regex: "( =)|(= )"
message: "Just one space should be before and after assignment"