forked from meshtastic/Meshtastic-Apple
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.swiftlint.yml
60 lines (50 loc) · 1.23 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
# Exclude automatically generated Swift files
excluded:
- MeshtasticProtobufs
line_length: 400
type_name:
min_length: 1
max_length:
warning: 60
error: 70
excluded: iPhone # excluded via string
allowed_symbols: ["_"] # these are allowed in type names
identifier_name:
min_length: 1
max_length:
warning: 60
allowed_symbols: ["_"] # these are allowed in type names
# TODO: should review
force_try:
severity: warning # explicitly
# TODO: should review
file_length:
warning: 3500
error: 4000
# TODO: should review
cyclomatic_complexity:
warning: 60
error: 70
ignores_case_statements: true
# TODO: should review
function_body_length:
warning: 200
# TODO: should review
type_body_length:
warning: 400
# TODO: should review
disabled_rules: # rule identifiers to exclude from running
- operator_whitespace
- multiple_closures_with_trailing_closure
- todo
# TODO: should review
nesting:
type_level:
warning: 3
custom_rules:
disable_print:
included: ".*\\.swift"
name: "Disable `print()`"
regex: "((\\bprint)|(Swift\\.print))\\s*\\("
message: "Consider using a dedicated log message or the Xcode debugger instead of using `print`. ex. logger.debug(...)"
severity: warning