Skip to content

Commit 17ed36d

Browse files
committed
Add shared SwiftLint configuration
Inherit SwiftLint rules from the parent swift-standards repository.
1 parent 832a452 commit 17ed36d

File tree

1 file changed

+5
-68
lines changed

1 file changed

+5
-68
lines changed

.swiftlint.yml

Lines changed: 5 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,7 @@
1-
disabled_rules:
2-
- line_length
3-
- trailing_comma
4-
- redundant_discardable_let
5-
- nesting
1+
# SwiftLint configuration for swift-rfc-4287
2+
# Inherits from the shared parent configuration in swift-standards
63

7-
opt_in_rules:
8-
- explicit_init
9-
- closure_spacing
10-
- empty_count
11-
- empty_string
12-
- fatal_error_message
13-
- first_where
14-
- joined_default_parameter
15-
- operator_usage_whitespace
16-
- overridden_super_call
4+
parent_config: https://raw.githubusercontent.com/swift-standards/swift-standards/main/.swiftlint.yml
175

18-
included:
19-
- Sources
20-
- Tests
21-
22-
excluded:
23-
- .build
24-
- Carthage
25-
- Pods
26-
- fastlane
27-
28-
# Type body length settings
29-
type_body_length:
30-
warning: 500
31-
error: 600
32-
33-
# File length settings
34-
file_length:
35-
warning: 800
36-
error: 1000
37-
ignore_comment_only_lines: true
38-
39-
# Function body length settings
40-
function_body_length:
41-
warning: 100
42-
error: 120
43-
44-
# Function parameter count
45-
function_parameter_count:
46-
warning: 15
47-
error: 20
48-
49-
# Cyclomatic complexity
50-
cyclomatic_complexity:
51-
warning: 15
52-
error: 20
53-
54-
# Identifier name settings
55-
identifier_name:
56-
min_length:
57-
warning: 2
58-
max_length:
59-
warning: 50
60-
error: 60
61-
excluded:
62-
- id
63-
- URL
64-
- to
65-
- db
66-
67-
# Type name settings - allow RFC_XXXX pattern
68-
type_name:
69-
allowed_symbols:
70-
- "_"
6+
# Package-specific overrides (if needed)
7+
# Add any swift-rfc-4287 specific rules here

0 commit comments

Comments
 (0)