Skip to content

Commit 88d0c9e

Browse files
committed
fix: configure SwiftLint to work with swift-format
1 parent a31c3c0 commit 88d0c9e

File tree

1 file changed

+34
-6
lines changed

1 file changed

+34
-6
lines changed

.swiftlint.yml

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,30 @@ disabled_rules:
33
- identifier_name
44
- nesting # Allow deeply nested enums for namespacing
55
- redundant_discardable_let # Preserve 'let _ =' in result builder contexts (required for Swift 6.0+)
6+
- opening_brace # Handled by swift-format
7+
- trailing_comma # Handled by swift-format
8+
- orphaned_doc_comment # Allow module-level documentation
9+
- large_tuple # CSS color validation requires tuples with multiple components
10+
- mark # Allow flexible MARK comment formatting
11+
- redundant_string_enum_value # Explicit enum values improve clarity for CSS keywords
612

713
opt_in_rules:
814
- empty_count
915
- explicit_init
1016
- sorted_imports
1117
- force_cast
1218
- force_try
13-
- force_unwrapping
1419
- closure_spacing
1520
- operator_usage_whitespace
1621
- private_outlet
1722
- redundant_nil_coalescing
18-
- unused_capture_list
19-
- empty_string
20-
- explicit_enum_raw_value
2123
- literal_expression_end_indentation
2224
- single_test_class
2325
- sorted_first_last
2426
- vertical_whitespace
25-
- strict_fileprivate
2627
- legacy_random
2728
- no_extension_access_modifier
2829
- colon
29-
- trailing_comma
3030

3131
included:
3232
- Package.swift
@@ -48,3 +48,31 @@ colon:
4848

4949
vertical_whitespace:
5050
max_empty_lines: 1
51+
52+
# Increased length limits for test files
53+
type_body_length:
54+
warning: 400
55+
error: 500
56+
57+
file_length:
58+
warning: 750
59+
error: 800
60+
61+
# Allow short type names for CSS elements (RGB, HSL, CMYK, etc.)
62+
type_name:
63+
min_length:
64+
warning: 1
65+
error: 0
66+
max_length:
67+
warning: 40
68+
error: 50
69+
70+
# Allow more function parameters for CSS functions with many values
71+
function_parameter_count:
72+
warning: 8
73+
error: 10
74+
75+
# Increased cyclomatic complexity for CSS property parsing functions
76+
cyclomatic_complexity:
77+
warning: 16
78+
error: 20

0 commit comments

Comments
 (0)