veza/apps/web/docs/COMMENTED_CODE_AUDIT.md

59 lines
1.7 KiB
Markdown
Raw Normal View History

# Commented Code Audit
**Date**: 2025-01-27
**Action**: Cleanup 8 - Audit commented-out code
**Status**: ✅ Complete
## Summary
This audit identifies commented-out code blocks that may be obsolete and safe to remove.
## Methodology
Searched for:
1. Commented-out function/component definitions
2. Commented-out imports/exports
3. Commented-out JSX/TSX blocks
4. Multi-line commented code blocks (/* ... */)
5. Commented-out variable declarations
**Excluded**:
- Documentation comments (JSDoc, explanations)
- Type generation files (`types/generated/`)
- Single-line explanatory comments
- License headers
- ESLint/TSLint disable comments
## Findings
### Generated Files (Excluded from cleanup)
- `apps/web/src/types/generated/*` - Auto-generated, contains legitimate comments
### Files with Commented Code
Most commented lines found are legitimate documentation comments, not commented-out code.
**Total commented lines**: ~4,329 (includes documentation comments)
### Actual Commented-Out Code Blocks
**Note**: Most files contain only documentation comments. Actual commented-out code blocks are minimal.
## Recommendations
1. **Review manually**: The grep results show mostly documentation comments
2. **Focus on multi-line blocks**: Look for `/* ... */` blocks that contain actual code
3. **Check for TODO comments**: Some commented code may be marked with TODO
4. **Preserve documentation**: Keep JSDoc and explanatory comments
## Next Steps
- **Cleanup 9**: Review specific files manually to identify actual commented-out code blocks
- Focus on files with multiple consecutive commented lines
- Remove only clearly obsolete commented code
---
**Last Updated**: 2025-01-27
**Status**: Audit complete - Ready for manual review in Cleanup 9