-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path.swiftlint.yml
More file actions
82 lines (73 loc) · 1.7 KB
/
Copy path.swiftlint.yml
File metadata and controls
82 lines (73 loc) · 1.7 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
excluded:
- Build
- DerivedData
- Pods
- build
- .build
- Motive.xcodeproj
# Rule configuration
file_length:
warning: 500
error: 1000
ignore_comment_only_lines: true
function_body_length:
warning: 50
error: 200
type_body_length:
warning: 300
error: 700
line_length:
warning: 150
error: 250
ignores_comments: true
ignores_urls: true
# Disabled rules (too noisy for existing codebase)
disabled_rules:
- trailing_comma
- opening_brace
- identifier_name
- large_tuple
- force_cast
- nesting
- cyclomatic_complexity
- type_name
- todo
- force_try
- multiple_closures_with_trailing_closure
- implicit_optional_initialization
- trailing_whitespace
# Opt-in rules
opt_in_rules:
- empty_count
- closure_spacing
- contains_over_first_not_nil
- fatal_error_message
- first_where
- overridden_super_call
- redundant_nil_coalescing
# Analyzer rules (require `swiftlint analyze`)
analyzer_rules:
- unused_import
custom_rules:
no_system_font_in_core_ui:
name: "No System Font In Core UI"
included:
- Motive/UI/CommandBar
- Motive/UI/Drawer
- Motive/UI/QuickConfirm
- Motive/UI/Settings
- Motive/UI/StatusNotification
regex: "\\.system\\(size:\\s*\\d+"
message: "Use Font.Aurora typography tokens instead of hardcoded .system(size:)"
severity: warning
no_hex_color_in_core_ui:
name: "No Hex Color In Core UI"
included:
- Motive/UI/CommandBar
- Motive/UI/Drawer
- Motive/UI/QuickConfirm
- Motive/UI/Settings
- Motive/UI/StatusNotification
regex: "(Color|NSColor)\\(hex:"
message: "Use Color.Aurora tokens instead of direct hex colors in core UI surfaces"
severity: warning