Skip to content

[Refactor] Remove dead code markers and fix all clippy warnings #60

@oleander

Description

@oleander

Context

Currently src/hook.rs and src/bin/hook.rs have #![allow(dead_code)] directives that mask potential dead code warnings. This needs to be removed and all warnings addressed.

Priority

🔴 CRITICAL - Must be done first before other refactoring

Steps

  1. Remove dead code suppression

    # Remove this line from both files:
    # src/hook.rs:1
    # src/bin/hook.rs:1
    #![allow(dead_code)]
  2. Run clippy to find issues

    cargo clippy --all-targets --all-features
  3. Address each warning

    • For unused private items: Delete if truly unused
    • For unused public items: Add documentation explaining their purpose or remove if obsolete
    • Specifically investigate:
      • StringPool struct in hook.rs lines 62-85 (defined but never used)
      • Args struct in hook.rs lines 50-58 (may duplicate bin/hook.rs)
      • Any test helper functions that are obsolete
  4. Run automated fixes

    cargo fix --allow-dirty --allow-staged
    cargo clippy --fix --allow-dirty --allow-staged

Verification Criteria

Pass:

  • cargo clippy produces ZERO warnings
  • cargo test passes all tests
  • cargo build --release succeeds
  • No #![allow(dead_code)] directives remain (except with explicit justification comments)
  • All dead code either removed or documented as intentionally public API

Estimated Time

2-3 hours

Dependencies

None - this should be done first

Labels

  • refactor
  • technical-debt
  • priority: critical

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions