-
Notifications
You must be signed in to change notification settings - Fork 0
/
.swiftlint.yml
96 lines (89 loc) · 2.04 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
disabled_rules:
- trailing_whitespace
- notification_center_detachment
included: # paths to include during linting. `--path` is ignored if present.
- Transporter
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Carthage
- Pods
opt_in_rules:
- attributes
- closure_end_indentation
- conditional_returns_on_newline
- empty_count
- empty_string
- explicit_init
- fatal_error_message
- first_where
- anyobject_protocol
- implicit_return
- force_unwrapping
- operator_usage_whitespace
- vertical_parameter_alignment_on_call
- switch_case_on_newline
- closure_spacing
- trailing_closure
- discouraged_direct_init
- unneeded_parentheses_in_closure_argument
- nesting
- nimble_operator
- private_action
- private_outlet
- private_over_fileprivate
- private_unit_test
- legacy_multiple
- duplicate_enum_cases
function_body_length:
warning: 250
error: 500
force_cast: warning # implicitly
force_try:
severity: warning # explicitly
line_length: 180
file_length:
warning: 500
error: 800
# ignore_comment_only_lines: true
type_name:
min_length: 3 # only warning
max_length: # warning and error
warning: 60
error: 100
# excluded: iPhone # excluded via string
type_body_length:
warning: 300
error: 800 #temporaty solution
identifier_name:
min_length: # only min_length
error: 3 # only error
excluded: # excluded via string array
- id
- URL
- iv
- cc
- ad
- up
nesting:
type_level: 2
statement_level: 5
attributes:
always_on_line_above:
- "@available"
- "@discardableResult"
always_on_same_line:
- "@IBOutlet"
- "@IBAction"
- "@NSManaged"
- "@testable"
- "@objc"
- "@nonobjc"
closure_end_indentation: error
conditional_returns_on_newline: error
explicit_init: error
fatal_error_message: warning
operator_usage_whitespace: warning
vertical_parameter_alignment_on_call: warning
switch_case_on_newline: warning
private_outlet:
allow_private_set: true
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle)