veza/apps/web/docs/COMMENTED_CODE_AUDIT.md
senke 128e80f9c4 cleanup: audit commented-out code (Cleanup 8)
- Created COMMENTED_CODE_AUDIT.md documenting findings
- Found ~4,329 commented lines total (mostly documentation)
- Actual commented-out code blocks are minimal
- Excluded generated files and documentation comments
- Ready for manual review in Cleanup 9
- Cleanup 8: Complete
2026-01-16 12:12:38 +01:00

1.7 KiB

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