-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.swiftlint.yml
More file actions
79 lines (67 loc) · 2.22 KB
/
.swiftlint.yml
File metadata and controls
79 lines (67 loc) · 2.22 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
# SwiftLint Configuration for StillView - Simple Image Viewer
# Paths to include during linting
included:
- StillView - Simple Image Viewer
# Paths to exclude during linting
excluded:
- StillView - Simple Image Viewer Tests
- StillView - Simple Image Viewer.xcodeproj
- .build
# Rules to disable
disabled_rules:
- trailing_whitespace # Allow trailing whitespace for now
- todo # Allow TODO comments
- redundant_string_enum_value # Allow explicit string enum values for clarity
- unused_closure_parameter # Allow unused parameters in closures
- force_unwrapping # Allow force unwrapping in some cases
- large_tuple # Allow tuples with more than 2 members
- multiple_closures_with_trailing_closure # Allow multiple trailing closures
- orphaned_doc_comment # Allow orphaned documentation comments
- blanket_disable_command # Allow blanket disable commands
- trailing_newline # Allow files without trailing newlines
- vertical_whitespace # Allow multiple empty lines
- for_where # Allow traditional for loops instead of for-where
- line_length # Disable line length warnings (still have 150 char error limit)
- empty_count # Allow count == 0 instead of isEmpty
- duplicate_conditions # Allow duplicate conditions in branch statements
- redundant_discardable_let # Allow let _ =
- implicit_optional_initialization # Allow = nil initialization
- unneeded_synthesized_initializer # Allow explicit memberwise initializers
- superfluous_disable_command # Allow extra disable commands
- colon # Allow flexible colon spacing
- trailing_comma # Allow trailing commas
# Rules to enable (minimal for flexibility)
opt_in_rules:
- closure_spacing
# Configure rules
line_length:
warning: 120
error: 150
ignores_comments: true
function_body_length:
warning: 80
error: 120
function_parameter_count:
warning: 8
error: 10
cyclomatic_complexity:
warning: 15
error: 25
type_body_length:
warning: 700
error: 1000
file_length:
warning: 1200
error: 2000
identifier_name:
min_length: 1
max_length: 60
# Custom rules
custom_rules:
no_print:
name: "No Print Statements"
regex: "print\\("
match_kinds:
- identifier
message: "Use os.log instead of print statements"
severity: warning