forked from Intent-Lab/VisionClaw
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.swiftlint.yml
More file actions
63 lines (54 loc) · 1.91 KB
/
.swiftlint.yml
File metadata and controls
63 lines (54 loc) · 1.91 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
# SwiftLint Configuration for VisionClaw
# https://github.com/realm/SwiftLint
#
# Pragmatic configuration for inherited codebase
# Focus on catching serious issues, not stylistic preferences
# Paths to include during linting
included:
- samples/CameraAccess/CameraAccess
# Paths to exclude during linting
excluded:
- Carthage
- Pods
- samples/CameraAccess/CameraAccess.xcodeproj
- samples/CameraAccess/CameraAccessTests
- samples/CameraAccess/build
- samples/CameraAccess/DerivedData
# Rules to disable (inherited code patterns)
disabled_rules:
- trailing_whitespace # Git handles whitespace
- trailing_comma # Trailing commas are fine in Swift
- opening_brace # Flexible brace positioning
- multiple_closures_with_trailing_closure # Common SwiftUI pattern
- identifier_name # Allow short names in loops/closures
- line_length # Too restrictive for existing code
- function_body_length # Some functions legitimately complex
- cyclomatic_complexity # State machines naturally complex
- type_body_length # ViewModels can be large
- unused_closure_parameter # Parameters can document intent
# Rules to enable (opt-in rules that add value)
opt_in_rules:
- empty_count # Prefer isEmpty over count == 0
- first_where # Use .first(where:) over .filter{}.first
- sorted_first_last # Use .sorted().first over .min()
# Rule configurations for enabled rules
file_length:
warning: 600
error: 1000
nesting:
type_level:
warning: 3
function_level:
warning: 4
type_name:
min_length: 3
max_length: 60
# Custom rules (focus on serious issues only)
custom_rules:
no_print:
name: "No print statements"
regex: '(?<!//)\bprint\('
message: "Use NSLog instead of print for proper system logging"
severity: warning
# Reporter type
reporter: "github-actions-logging"