-
-
Notifications
You must be signed in to change notification settings - Fork 51
/
.swiftlint.yml
115 lines (100 loc) · 2.03 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
disabled_rules:
- operator_whitespace
- multiple_closures_with_trailing_closure
opt_in_rules:
- array_init
- class_delegate_protocol
- collection_alignment
- contains_over_first_not_nil
- empty_count
- empty_string
- fallthrough
- fatal_error_message
- first_where
- for_where
- last_where
- legacy_multiple
- legacy_random
- multiline_arguments
- multiline_parameters
- reduce_into
- sorted_first_last
- sorted_imports
- static_operator
- toggle_bool
- unavailable_function
- vertical_parameter_alignment_on_call
- yoda_condition
included:
- SwiftyInsta
excluded:
- Pods
#- SwiftyInsta/*/*/APIHandler.swift # skip a bug with #if(os(_)) @available()
- SwiftyInsta/*/CryptoHelper.swift
- SwiftyInsta/*/KeychainSwiftDistrib.swift
analyzer_rules:
- explicit_self
array_init: error
class_delegate_protocol: error
contains_over_first_not_nil: error
empty_count: error
empty_string: error
fatal_error_message: error
first_where: error
for_where: error
last_where: error
legacy_multiple: error
legacy_random: error
multiline_parameters: error
sorted_first_last: error
static_operator: error
unavailable_function: error
vertical_parameter_alignment_on_call: error
nesting:
type_level:
warning: 2
cyclomatic_complexity:
warning: 12
error: 15
file_length:
warning: 1000
error: 1500
type_body_length:
warning: 600
error: 1000
function_body_length:
warning: 180
error: 100
line_length:
warning: 150
error: 150
identifier_name:
max_length:
warning: 45
error: 50
min_length:
warning: 3
error: 1
excluded:
- x
- y
- z
- ok # it might be removed in the future.
- id # prefer identifier.
- iv
- pk
- fr
- in
- me
- URL
- url
type_name:
min_length:
warning: 3
error: 1
excluded:
- LG
function_parameter_count:
warning: 10
error: 15
reporter: "xcode"