-
Notifications
You must be signed in to change notification settings - Fork 0
/
.swiftlint.yml
89 lines (72 loc) · 1.53 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
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Pods
- Project/R.generated.swift
type_body_length:
- 300 # warning
- 400 # error
# or they can set both explicitly
file_length:
warning: 500
error: 800
line_length:
warning: 175
error: 200
ignores_function_declarations: true
ignores_comments: true
ignores_interpolated_strings: true
ignores_urls: true
disabled_rules:
- identifier_name
- todo
- trailing_whitespace
- multiple_closures_with_trailing_closure
- nesting
- function_parameter_count
- type_name
- cyclomatic_complexity
large_tuple: # warn user when using 3 values in tuple, give error if there are 4
- 3
- 4
opt_in_rules:
- anyobject_protocol
- closure_spacing
- conditional_returns_on_newline
- duplicate_imports
- empty_string
- force_unwrapping
- let_var_whitespace
- nslocalizedstring_key
- private_action
- private_outlet
- switch_case_on_newline
- unneeded_parentheses_in_closure_argument
- control_statement
- empty_count
- trailing_newline
- colon
- comma
anyobject_protocol:
severity: error
conditional_returns_on_newline:
severity: error
if_only: true
discouraged_direct_init:
severity: error
types:
- Bundle
- UIDevice
- UIScreen
- UIApplication
force_cast:
severity: error
force_try:
severity: error
force_unwrapping:
severity: error
switch_case_alignment:
severity: error
indented_cases: false
switch_case_on_newline:
severity: error
unneeded_break_in_switch:
severity: error