-
Notifications
You must be signed in to change notification settings - Fork 7
/
.swiftlint.yml
122 lines (101 loc) · 2.02 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
disabled_rules: # rule identifiers to exclude from running
- identifier_name
- nesting
- function_parameter_count
- type_name
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:
- todo
large_tuple: # warn user when using 3 values in tuple, give error if there are 4
- 3
- 4
opt_in_rules:
- closure_spacing
- conditional_returns_on_newline
- duplicate_imports
- empty_string
- force_unwrapping
- implicit_return
- let_var_whitespace
- nslocalizedstring_key
- private_action
- private_outlet
- switch_case_on_newline
- unneeded_parentheses_in_closure_argument
#- weak_computed_property
- control_statement
- empty_count
- trailing_newline
- colon
- comma
conditional_returns_on_newline:
severity: error
if_only: true
cyclomatic_complexity:
warning: 10
error: 20
ignores_case_statements: true
discouraged_direct_init:
severity: error
types:
- Bundle
- UIDevice
- UIScreen
- UIApplication
force_cast:
severity: error
force_try:
severity: error
force_unwrapping:
severity: error
function_parameter_count:
warning: 5
error: 5
identifier_name:
min_length:
warning: 3
error: 2
max_length:
warning: 40
error: 64
excluded:
- id
nesting:
type_level:
warning: 2
function_level:
warning: 3
switch_case_alignment:
severity: error
indented_cases: true
switch_case_on_newline:
severity: error
type_name:
min_length:
warning: 3
max_length:
warning: 1000
excluded:
- "ID"
- "Id"
- "boilerplate_ios_swiftuiApp"
- "boilerplate_ios_swiftuiTests"
- "boilerplate_ios_swiftuiUITests"
unneeded_break_in_switch:
severity: error