-
Notifications
You must be signed in to change notification settings - Fork 0
/
.swiftlint.yml
131 lines (112 loc) · 2.29 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
127
128
129
130
131
disabled_rules:
- nesting
- redundant_string_enum_value
opt_in_rules:
- array_init
- closure_end_indentation
- closure_spacing
- contains_over_first_not_nil
- empty_count
- explicit_enum_raw_value
- explicit_init
- fatal_error_message
- first_where
- force_unwrapping
- implicit_return
- literal_expression_end_indentation
- no_grouping_extension
- operator_usage_whitespace
- overridden_super_call
- override_in_extension
- private_outlet
- redundant_nil_coalescing
- sorted_first_last
- strict_fileprivate
- trailing_closure
- unneeded_parentheses_in_closure_argument
excluded:
- Carthage
- Pods
- ThirdParty
- Vendor
- Scripts
- Generated
force_cast: error
force_try: error
force_unwrapping: error
trailing_whitespace:
ignores_empty_lines: false
severity: warning
trailing_newline: error
trailing_semicolon: error
vertical_whitespace:
max_empty_lines: 1
severity: warning
switch_case_alignment:
indented_cases: true
comma: error
colon:
severity: error
legacy_constructor: error
statement_position:
statement_mode: default
severity: error
legacy_constant: error
type_name:
min_length: 3
max_length:
warning: 45
error: 50
excluded:
- T
identifier_name:
max_length:
warning: 40
error: 50
min_length:
error: 3
excluded:
- x
- y
- at
- id
- db
- rs
- to
- in
- me
function_parameter_count:
warning: 10
error: 10
line_length:
warning: 140
error: 160
function_body_length:
warning: 100
error: 200
file_length:
warning: 500
error: 1000
cyclomatic_complexity:
warning: 20
error: 30
large_tuple:
warning: 4
error: 5
reporter: 'xcode'
custom_rules:
comments_space:
name: 'Space After Comment'
regex: '(^ *//\w+)'
message: 'There should be a space after //'
severity: warning
empty_line_after_guard:
name: 'Empty Line After Guard'
regex: '(^ *guard[ a-zA-Z0-9=?.\(\),><!`]*\{[ a-zA-Z0-9=?.\(\),><!`\"]*\}\n *(?!(?:return|guard))\S+)'
message: 'There should be an empty line after a guard'
severity: error
empty_line_after_super:
name: 'Empty Line After Super'
regex: '(^ *super\.[ a-zA-Z0-9=?.\(\)\{\}:,><!`\"]*\n *(?!(?:\}|return))\S+)'
message: 'There should be an empty line after super'
severity: error