generated from element-hq/element-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.swiftlint.yml
executable file
·93 lines (76 loc) · 1.91 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
# rule identifiers to exclude from running
disabled_rules:
- trailing_whitespace
- todo
- mark
- vertical_whitespace
- syntactic_sugar
- unused_closure_parameter
- closure_parameter_position
- redundant_string_enum_value
- large_tuple
- shorthand_operator
- vertical_parameter_alignment
- identifier_name
- inclusive_language # Disabled until MasterTabBarController refactoring complete
# some rules are only opt-in
opt_in_rules:
- force_unwrapping
- private_action
- explicit_init
# paths to include during linting. `--path` is ignored if present.
included:
- Riot
# paths to ignore during linting. Takes precedence over `included`.
excluded:
- Carthage
- Pods
- Riot/Generated/
- Riot/Modules/LaunchLoading/LoadingAnimation/
line_length:
warning: 250
error: 1000
file_length:
warning: 800
error: 1000
type_body_length:
warning: 700
error: 1000
function_parameter_count:
warning: 7
error: 10
cyclomatic_complexity:
ignores_case_statements: true
warning: 20
error: 25
function_body_length:
warning: 100
error: 150
# naming rules can set warnings/errors for min_length and max_length
# additionally they can set excluded names
type_name:
min_length: 3 # only warning
max_length: # warning and error
warning: 150
error: 1000
custom_rules:
ns_log_deprecation:
regex: "\\b(NSLog)\\b"
match_kinds: identifier
message: "MXLog should be used instead of NSLog()"
severity: error
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