-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
priority-lowLow priorityLow prioritytech-debtTechnical debt that needs addressingTechnical debt that needs addressing
Description
Problem
Multiple properties are assigned values but never read, indicating either incomplete implementation or unnecessary assignments.
⚠️ SAFE CLEANUP ONLY - PRESERVE FUNCTIONALITY
This is about safe property cleanup, not feature removal:
- Keep all properties that may be used in future development
- Only clean up truly unnecessary assignments
- Mark intentionally unused properties appropriately
Categories of Unused Properties
View Model State Properties
Analytics Module:
CategoryBreakdownView.swift:270-categoryassigned but never readTrendsView.swift:167-periodassigned but never read
Potential Action: These may be preparation for future features - mark with // TODO: Use in feature X
Service Properties in ViewModels
Receipt Processing:
ReceiptPreviewViewModel.swift:21-documentStorageassigned but never used- May indicate incomplete document management feature
Container Properties
AppContainer.swift - Multiple service assignments:
- Properties that are assigned during dependency injection but not directly accessed
- May be accessed through protocols or dependency injection
Safe Cleanup Strategy
Option 1: Mark as Intentionally Unused
// For properties that will be used in future development
private let documentStorage: DocumentStorageProtocol // TODO: Implement document managementOption 2: Add Usage Comment
// For dependency injection properties
private let securityService: SecurityServiceProtocol // Used via DI containerOption 3: Remove if Truly Unnecessary
Only if property serves no current or planned purpose
Investigation Tasks
- Review each unused property for planned usage
- Check git history to understand property purpose
- Consult architecture docs for dependency injection patterns
- Identify future feature placeholders vs unnecessary code
Cleanup Tasks (After Investigation)
- Add TODO comments for future feature properties
- Add usage comments for DI container properties
- Remove only truly unnecessary assignments
- Update property documentation where needed
Safety Checks
- Verify no properties are accessed via reflection or strings
- Check that DI container doesn't require assigned properties
- Ensure no future features depend on these properties
- Test that removal doesn't break dependency injection
Acceptance Criteria
- Only safely removable properties are cleaned up
- Future feature placeholders are clearly marked
- Dependency injection continues to work
- No functionality is broken or removed
- Code intent is clearer with proper comments
Priority
Low - Safe technical debt reduction, non-critical for functionality
Metadata
Metadata
Assignees
Labels
priority-lowLow priorityLow prioritytech-debtTechnical debt that needs addressingTechnical debt that needs addressing