generated from element-hq/.github
-
Notifications
You must be signed in to change notification settings - Fork 103
/
.swiftlint.yml
executable file
·85 lines (70 loc) · 1.7 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
disabled_rules:
- trailing_whitespace
- unused_setter_value
- redundant_discardable_let
- identifier_name
opt_in_rules:
- force_unwrapping
- private_action
- explicit_init
- shorthand_optional_binding
included:
- ElementX
- UnitTests
- UITests
- Tools/Scripts/Templates
excluded:
- IntegrationTests
- ElementX/Sources/Generated
line_length:
warning: 250
error: 1000
file_length:
warning: 2000
type_name:
min_length: 3
max_length:
warning: 150
error: 1000
type_body_length:
warning: 1000
error: 1000
function_body_length:
warning: 100
error: 100
cyclomatic_complexity:
ignores_case_statements: true
nesting:
type_level:
warning: 5
custom_rules:
vstack_spacing:
regex: "(?-s)VStack((?!spacing:).)*\\s*\\{"
match_kinds: identifier
message: "Please use explicit spacing in VStacks."
severity: warning
hstack_spacing:
regex: "(?-s)HStack((?!spacing:).)*\\s*\\{"
match_kinds: identifier
message: "Please use explicit spacing in HStacks."
severity: warning
compound_color_conversion:
regex: "UIColor\\(\\.compound"
match_kinds: identifier
message: "Please use the UIColor token directly to ensure the colour scheme is honoured."
severity: warning
print_deprecation:
regex: "\\b(print)\\b"
match_kinds: identifier
message: "MXLog should be used instead of print()"
severity: error
print_ln_deprecation:
regex: "\\b(println)\\b"
match_kinds: identifier
message: "MXLog should be used instead of println()"
severity: error
os_log_deprecation:
regex: "\\b(os_log)\\b"
match_kinds: identifier
message: "MXLog should be used instead of os_log()"
severity: error