-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.swiftlint.yml
More file actions
69 lines (63 loc) · 2.47 KB
/
.swiftlint.yml
File metadata and controls
69 lines (63 loc) · 2.47 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
# SwiftLint configuration for Eppo iOS SDK
# Paths to include/exclude
included:
- Sources
- Tests
excluded:
- .build
- .swiftpm
- Tests/eppo/Resources
# Disabled rules - rules that would require significant refactoring of existing code
disabled_rules:
- trailing_whitespace
- line_length
- identifier_name # Existing code uses SCREAMING_SNAKE_CASE for constants
- type_name # Existing code uses UFC_ prefix for types
- force_unwrapping # Existing code uses force unwrapping in safe contexts
- force_try # Tests commonly use try! for simplicity
- force_cast # Existing code uses force casts in safe contexts
- discouraged_optional_boolean
- modifier_order # Existing code has different modifier ordering
- switch_case_alignment # Existing code uses different alignment style
- opening_brace # Existing code uses different brace style
- function_parameter_count # Existing code has functions with many parameters
- for_where # Existing code prefers if inside for loops
- todo # Allow TODO comments in codebase
- large_tuple # Existing code uses larger tuples
- file_length # Some files are large but well-organized
- type_body_length # Some classes are large but well-organized
- function_body_length # Some functions are large but clear
- cyclomatic_complexity # Some functions have necessary complexity
- closure_parameter_position
- vertical_whitespace
- trailing_newline
- implicit_optional_initialization
- non_optional_string_data_conversion
- function_name_whitespace
- redundant_discardable_let # Existing code uses let _ = pattern
# Opt-in rules - additional checks we want to enable
opt_in_rules:
- closure_spacing
- contains_over_first_not_nil
- empty_string
- first_where
- last_where
- legacy_random
- overridden_super_call
- prohibited_super_call
- redundant_nil_coalescing
- sorted_first_last
- yoda_condition
# Custom rules
custom_rules:
slow_hex_encoding:
name: "Slow Hex Encoding"
regex: '\.map\s*\{\s*String\(format:\s*["\u0027]%0?2h?h?[xX]["\u0027]'
message: "Avoid using String(format:) for hex encoding in map - it's slow due to intermediate String allocations. Use a lookup table or direct hex conversion instead."
severity: error
# Rule configurations
nesting:
type_level:
warning: 3
function_level:
warning: 5