-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.swiftlint.yml
More file actions
109 lines (91 loc) · 3.12 KB
/
.swiftlint.yml
File metadata and controls
109 lines (91 loc) · 3.12 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# SwiftLint Configuration — Strict Mode
# mkdn: Mac-native Markdown viewer/editor
strict: true
opt_in_rules:
- all
# Disabled rules: known false-positive-prone or incompatible with project style
disabled_rules:
# Conflicts with SwiftFormat or project conventions
- explicit_acl # Too noisy for app targets
- explicit_top_level_acl # Same reason
- explicit_type_interface # Redundant with type inference
- missing_docs # Will enable once API stabilizes
- file_types_order # Feature-based MVVM has its own ordering
- type_contents_order # Same reason
- no_grouping_extension # We use extensions for protocol conformance
- prefixed_toplevel_constant # Swift convention doesn't require prefix
- required_deinit # Not needed for most SwiftUI views
- conditional_returns_on_newline # Conflicts with SwiftFormat
- indentation_width # SwiftFormat handles indentation
- no_magic_numbers # Too aggressive for UI layout code
- sorted_imports # SwiftFormat handles import sorting
- contrasted_opening_brace # Allman-style braces — project uses K&R
- switch_case_on_newline # Project uses inline case bodies
- attributes # Single-line attributes are idiomatic Swift
- vertical_whitespace_between_cases # Not enforced in project style
- sorted_enum_cases # Enum order is intentional, not alphabetical
- one_declaration_per_file # Small helper types colocated with primary type
- modifier_order # Conflicts with @ObservationIgnored private nonisolated(unsafe)
- explicit_enum_raw_value # Implicit raw values are fine for simple enums
- no_extension_access_modifier # We use access modifiers on extensions
- accessibility_label_for_image # Will enable when accessibility pass begins
- accessibility_trait_for_button # Will enable when accessibility pass begins
- incompatible_concurrency_annotation # Swift 6 native — no Swift 5 compat needed
- opening_brace # Conflicts with SwiftFormat multi-line condition style
- no_empty_block # Required empty protocol conformances (init, updateNSView)
# Paths
included:
- mkdn
- mkdnTests
excluded:
- .build
- DerivedData
- mkdn/Resources
# Rule configurations
line_length:
warning: 120
error: 150
ignores_comments: true
ignores_urls: true
ignores_interpolated_strings: true
type_body_length:
warning: 350
error: 500
file_length:
warning: 500
error: 800
function_body_length:
warning: 50
error: 80
function_parameter_count:
warning: 6
error: 8
type_name:
min_length: 3
max_length: 50
identifier_name:
min_length: 2
max_length: 50
excluded:
- id
- x
- y
- i
- j
- ok
nesting:
type_level: 3
function_level: 3
cyclomatic_complexity:
warning: 15
error: 25
large_tuple:
warning: 3
error: 4
closure_body_length:
warning: 45
error: 60
trailing_comma:
mandatory_comma: true
vertical_whitespace:
max_empty_lines: 1