-
Notifications
You must be signed in to change notification settings - Fork 11
/
.swiftlint.yml
82 lines (79 loc) · 1.88 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
disabled_rules:
- computed_accessors_order # Swift Mock Generator doesn't do this.
- line_length
- unused_closure_parameter
- large_tuple
- cyclomatic_complexity
opt_in_rules:
- empty_count
- closure_spacing
- contains_over_first_not_nil
- explicit_init
- first_where
- let_var_whitespace
- literal_expression_end_indentation
- multiline_parameters
- nimble_operator
- operator_usage_whitespace
- overridden_super_call
- prohibited_super_call
- unneeded_parentheses_in_closure_argument
excluded:
- Pods
- Packages/*/.build
- Packages/*/Package.swift
- vendor
- Sources/CTR/Infrastructure/Resources/R.generated.swift
- Packages/*/.build
force_cast: warning
force_try:
severity: warning
function_body_length:
- 100
- 200
type_body_length:
- 300
- 400
nesting:
type_level:
warning: 2
error: 4
file_length:
warning: 800
error: 2000
identifier_name:
min_length:
warning: 2
max_length:
warning: 100
error: 100
function_parameter_count:
warning: 7
reporter: "xcode"
switch_case_alignment:
indented_cases: true
trailing_whitespace:
ignores_empty_lines: true
ignores_comments: true
custom_rules:
no_empty_comment_above_the_copyright:
regex: "//\\n/\\*"
disable_print:
included: "Sources/.*\\.swift"
excluded: "HolderUITests/"
name: "print usage"
regex: "((\\bprint)|(Swift\\.print))\\s*\\("
message: "Prefer logDebug over print"
disable_dump:
included: "Sources/.*\\.swift"
name: "dump usage"
regex: "((\\bdump)|(Swift\\.dump))\\s*\\("
message: "Prefer logDebug over dump"
snapshot_recording_turned_on:
included: "CTRTests/.*\\.swift"
regex: "^\\s*isRecording = true"
message: "Don't forget to turn off snapshot recording"
disable_onSuccess:
included: "Sources/.*\\.swift"
regex: "\\.onSuccess"
message: "Prefer .onComplete over .onFailure and .onSuccess"