-
-
Notifications
You must be signed in to change notification settings - Fork 624
/
.swiftlint.yml
60 lines (51 loc) · 1.24 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
disabled_rules: # rule identifiers to exclude from running
- function_parameter_count
- line_length
- variable_name
- cyclomatic_complexity
- nesting
- conditional_binding_cascade
- large_tuple
opt_in_rules: # some rules are only opt-in
- force_unwrapping
- force_https
- empty_count
- conditional_binding_cascade
included:
- Sourcery
- SourceryRuntime
- SourceryTests
- Templates/Tests
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Carthage
- Pods
- Packages
- SourceryTests/Stub
- Templates/Tests/Generated
- Templates/Tests/Expected
type_body_length:
- 700 #warning
- 1000 #error
file_length:
- 1000 #warning
- 1200 #error
function_body_length:
- 125 #warning
- 200 #error
type_name:
min_length: 3 # only warning
max_length: # warning and error
warning: 50
error: 50
custom_rules:
force_https:
name: "Force HTTPS over HTTP"
regex: "((?i)http(?!s))"
match_kinds: string
message: "HTTPS should be favored over HTTP"
severity: warning
explicit_failure_calls:
name: "Avoid asserting 'false'"
regex: '((assert|precondition)\(false)'
message: "Use assertionFailure() or preconditionFailure() instead."
severity: warning