-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.swift
More file actions
132 lines (123 loc) · 7.25 KB
/
Copy pathtest.swift
File metadata and controls
132 lines (123 loc) · 7.25 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Swift Code Analysis Report
**File**: test.swift
**Date**: 5/10/2025, 3:41 PM
**Issues Found**: 106
## Summary
- **Errors**: 0
- **Warnings**: 106
- **Info**: 0
## Issues by Category
- **Code Style**: 63
- **Exception Handling**: 1
- **Force Unwraps**: 6
- **Operator Precedence**: 1
- **Other Issues**: 7
- **Unused Variables**: 28
## Detailed Issues
### Warnings
- **Line 5**: Type name 'badlyNamedClass' should start with an uppercase letter (UpperCamelCase)
- **Line 5**: Symbol 'badlyNamedClass' appears to be unused or only referenced in its declaration
- **Line 6**: Line contains trailing whitespace
- **Line 7**: Line contains trailing whitespace
- **Line 7**: Symbol 'testImmutableAssignment' appears to be unused or only referenced in its declaration
- **Line 8**: Line contains trailing whitespace
- **Line 8**: Symbol 'constant' appears to be unused or only referenced in its declaration
- **Line 9**: Magic number '10' found. Consider extracting this as a named constant
- **Line 9**: Line contains trailing whitespace
- **Line 10**: Line contains trailing whitespace
- **Line 12**: Line contains trailing whitespace
- **Line 13**: Line contains trailing whitespace
- **Line 13**: Symbol 'testForceUnwrap' appears to be unused or only referenced in its declaration
- **Line 14**: Force unwrap operator used which may cause runtime crashes
- **Line 14**: Line contains trailing whitespace
- **Line 15**: Line contains trailing whitespace
- **Line 17**: Line contains trailing whitespace
- **Line 18**: Line contains trailing whitespace
- **Line 18**: Symbol 'testOperatorPrecedence' appears to be unused or only referenced in its declaration
- **Line 19**: Variable 'result' declared but never used
- **Line 19**: Mixed logical and arithmetic operators - use parentheses to clarify precedence
- **Line 19**: Line contains trailing whitespace
- **Line 19**: Symbol 'result' appears to be unused or only referenced in its declaration
- **Line 20**: Line contains trailing whitespace
- **Line 22**: Line contains trailing whitespace
- **Line 23**: Line contains trailing whitespace
- **Line 23**: Symbol 'testUnreachableCode' appears to be unused or only referenced in its declaration
- **Line 24**: Magic number '42' found. Consider extracting this as a named constant
- **Line 24**: Line contains trailing whitespace
- **Line 25**: Unreachable code detected after return statement
- **Line 25**: Consider localizing this string literal: "This will never be executed"
- **Line 25**: Line contains trailing whitespace
- **Line 26**: Line contains trailing whitespace
- **Line 28**: Line contains trailing whitespace
- **Line 29**: Line contains trailing whitespace
- **Line 29**: Symbol 'calculateDiscount' appears to be unused or only referenced in its declaration
- **Line 30**: Magic number '0.15' found. Consider extracting this as a named constant
- **Line 30**: Line contains trailing whitespace
- **Line 31**: Line contains trailing whitespace
- **Line 33**: Line contains trailing whitespace
- **Line 34**: Line contains trailing whitespace
- **Line 34**: Symbol 'testUnusedVariable' appears to be unused or only referenced in its declaration
- **Line 35**: Variable 'unused' declared but never used
- **Line 35**: Line contains trailing whitespace
- **Line 35**: Symbol 'unused' appears to be unused or only referenced in its declaration
- **Line 36**: Line contains trailing whitespace
- **Line 37**: Line contains trailing whitespace
- **Line 39**: Line contains trailing whitespace
- **Line 40**: Line contains trailing whitespace
- **Line 40**: Symbol 'testExcessiveChaining' appears to be unused or only referenced in its declaration
- **Line 41**: Excessive optional chaining depth (5). Consider unwrapping optionals or using guard/if let
- **Line 41**: Excessive optional chaining depth (5). Consider unwrapping optionals or using guard/if let
- **Line 41**: Excessive optional chaining depth (5). Consider unwrapping optionals or using guard/if let
- **Line 41**: Excessive optional chaining depth (5). Consider unwrapping optionals or using guard/if let
- **Line 41**: Excessive optional chaining depth (5). Consider unwrapping optionals or using guard/if let
- **Line 41**: Line contains trailing whitespace
- **Line 42**: Line contains trailing whitespace
- **Line 44**: Line contains trailing whitespace
- **Line 45**: Line contains trailing whitespace
- **Line 45**: Symbol 'testMemoryLeak' appears to be unused or only referenced in its declaration
- **Line 46**: Variable 'closure' declared but never used
- **Line 46**: Potential retain cycle: closure uses 'self' strongly. Consider using [weak self] or [unowned self]
- **Line 46**: Line contains trailing whitespace
- **Line 46**: Symbol 'closure' appears to be unused or only referenced in its declaration
- **Line 47**: Line contains trailing whitespace
- **Line 48**: Line contains trailing whitespace
- **Line 49**: Line contains trailing whitespace
- **Line 51**: Line contains trailing whitespace
- **Line 52**: Line contains trailing whitespace
- **Line 52**: Symbol 'testEmptyCatch' appears to be unused or only referenced in its declaration
- **Line 53**: Line contains trailing whitespace
- **Line 54**: Line contains trailing whitespace
- **Line 55**: Empty catch block. Errors should be handled or logged
- **Line 55**: Line contains trailing whitespace
- **Line 56**: Line contains trailing whitespace
- **Line 57**: Line contains trailing whitespace
- **Line 58**: Line contains trailing whitespace
- **Line 60**: Line contains trailing whitespace
- **Line 60**: Symbol 'riskyOperation' appears to be unused or only referenced in its declaration
- **Line 61**: Line contains trailing whitespace
- **Line 62**: Line contains trailing whitespace
- **Line 66**: Symbol 'calculateSum' appears to be unused or only referenced in its declaration
- **Line 67**: Line contains trailing whitespace
- **Line 68**: Line contains trailing whitespace
- **Line 69**: Line contains trailing whitespace
- **Line 70**: Line contains trailing whitespace
- **Line 71**: Line contains trailing whitespace
- **Line 74**: Symbol 'computeTotal' appears to be unused or only referenced in its declaration
- **Line 75**: Line contains trailing whitespace
- **Line 76**: Line contains trailing whitespace
- **Line 77**: Line contains trailing whitespace
- **Line 78**: Line contains trailing whitespace
- **Line 79**: Line contains trailing whitespace
- **Line 82**: Symbol 'SomeClass' appears to be unused or only referenced in its declaration
- **Line 83**: Line contains trailing whitespace
- **Line 83**: Symbol 'property' appears to be unused or only referenced in its declaration
- **Line 86**: Symbol 'SubProperty' appears to be unused or only referenced in its declaration
- **Line 87**: Line contains trailing whitespace
- **Line 87**: Symbol 'subProperty' appears to be unused or only referenced in its declaration
- **Line 90**: Symbol 'ItemContainer' appears to be unused or only referenced in its declaration
- **Line 91**: Line contains trailing whitespace
- **Line 91**: Symbol 'items' appears to be unused or only referenced in its declaration
- **Line 94**: Symbol 'Item' appears to be unused or only referenced in its declaration
- **Line 95**: Line contains trailing whitespace
- **Line 95**: Symbol 'name' appears to be unused or only referenced in its declaration
- **Line 96**: Line contains trailing whitespace