-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
maintenanceMaintenance tasks and technical debtMaintenance tasks and technical debttech-debtTechnical debt that needs addressingTechnical debt that needs addressing
Description
Summary
Completed initial Periphery static analysis to identify unused code in the codebase. While we successfully resolved the major compilation issues and cleaned up some unused code, additional cleanup is needed.
Completed Work
- ✅ Fixed major compilation errors (CoreModels imports, OCRResult types, method signatures)
- ✅ Removed unused Preview structs in AnalyticsHomeView
- ✅ Features-Analytics module now builds successfully
- ✅ Implemented complete MockReceiptRepository with all protocol methods
Periphery Analysis Findings
The analysis identified several categories of unused code:
Successfully Cleaned Up
AnalyticsHomeView_Previews- Removed unused preview struct- CoreModels import dependencies - Fixed in multiple files
Still Needs Cleanup
Based on periphery-scan-results.txt, the following items were identified as unused:
- Additional OCRResult references in DocumentScannerView.swift
- Various properties and methods marked as unused but may be false positives
- Preview-related warnings that need @Previewable annotations
Files Generated
periphery-scan-results.txt- Main analysis resultsperiphery-report.csv- Structured data for further analysisunused-code-report.txt- Comprehensive unused code analysisTODO-periphery-cleanup.md- Action items for cleanup
Next Steps
- Continue fixing remaining OCRResult type errors in other files
- Review Periphery findings for false positives vs actual unused code
- Implement remaining protocol method fixes
- Add @Previewable annotations where needed
- Consider running Periphery analysis periodically as part of CI
Related Issues
- Related to overall codebase cleanup and maintenance
- Part of ongoing effort to reduce technical debt
- Supports build reliability improvements
Technical Notes
- Periphery v3.1.0 used for analysis
- Analysis run on full codebase with build-for-testing target
- Some warnings may be SwiftUI-related false positives due to declarative nature
Metadata
Metadata
Assignees
Labels
maintenanceMaintenance tasks and technical debtMaintenance tasks and technical debttech-debtTechnical debt that needs addressingTechnical debt that needs addressing