-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy path.swiftlint.yml
More file actions
83 lines (70 loc) · 2.3 KB
/
Copy path.swiftlint.yml
File metadata and controls
83 lines (70 loc) · 2.3 KB
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
# SwiftLint configuration for Prey iOS
# https://github.com/realm/SwiftLint
# ─── Paths ───────────────────────────────────────────────
excluded:
- Prey/Swifter # Third-party library
- Pods
- Carthage
- DerivedData
- build
- "*.generated.swift"
# ─── Enabled opt-in rules ────────────────────────────────
opt_in_rules:
- closure_spacing
- collection_alignment
- contains_over_filter_count
- contains_over_first_not_nil
- empty_collection_literal
- empty_string
- enum_case_associated_values_count
- fatal_error_message
- first_where
- last_where
- modifier_order
- overridden_super_call
- private_action
- private_outlet
- redundant_nil_coalescing
- sorted_first_last
- toggle_bool
- unneeded_parentheses_in_closure_argument
- vertical_whitespace_closing_braces
# ─── Disabled rules ──────────────────────────────────────
# Relaxed to avoid overwhelming warnings on existing code
disabled_rules:
- trailing_whitespace # Too noisy on legacy code
- todo # Allow TODO/FIXME comments
- nesting # Project uses nested types
- type_name # Some short type names exist
- identifier_name # Project uses SCREAMING_CASE and PascalCase conventions
- shorthand_operator # Low priority for existing code
# ─── Rule configuration ─────────────────────────────────
line_length:
warning: 200
error: 350
ignores_comments: true
ignores_urls: true
file_length:
warning: 600
error: 1200
type_body_length:
warning: 400
error: 800
function_body_length:
warning: 60
error: 120
function_parameter_count:
warning: 6
error: 8
cyclomatic_complexity:
warning: 15
error: 25
large_tuple:
warning: 3
error: 4
force_cast: warning
force_try: warning
vertical_whitespace:
max_empty_lines: 2
# ─── Reporter ────────────────────────────────────────────
reporter: "xcode"