-
Notifications
You must be signed in to change notification settings - Fork 1
/
.swiftlint.yml
73 lines (62 loc) · 1.17 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
disabled_rules:
- mark
- identifier_name
- cyclomatic_complexity
- nesting
opt_in_rules:
- attributes
- empty_count
- file_header
- fatal_error_message
- private_outlet
- raw_value_for_camel_cased_codable_enum
- force_https
included:
- Sources
- Tests
excluded:
- bin
- Carthage
- fastlane
- lib
- script
- .bundle
- Scripts
# Be mindful of force cast force try. Add lint ignoring commentary if these are valid.
force_cast:
severity: warning
force_try:
severity: warning
# Personal preference.
line_length:
warning: 150
error: 500
ignores_comments: true
ignores_urls: true
identifier_name:
min_length: 2
max_length:
warning: 90
error: 1000
excluded:
- id
- x
- y
# Prefer file lengths of less than 500. Its a code smell otherwise.
file_length:
warning: 500
error: 1200
type_body_length:
warning: 500
error: 1200
function_body_length:
warning: 80
error: 120
custom_rules:
force_https:
name: "Force HTTPS over HTTP"
regex: "((?i)http(?!s))"
match_kinds: string
message: "URLs should use HTTPS rather than HTTP to ensure secure connections."
severity: warning
reporter: "xcode"