Skip to content

chore(lints): remove dead code #13

Description

@araujof

Description

dead_code is allow in [workspace.lints.rust] (Cargo.toml:198), so nothing in the workspace reports unused items. The coverage effort found zero-caller functions by hand while chasing uncovered lines, which is the wrong way to find them. Two are known:

  • PolicyEngine::remove_route_annotation (crates/ppe-core/src/engine.rs:1312). No production caller. It has a test only because coverage work added one.
  • RouteHandler::with_pdp_router (crates/ppe-apl-runtime/src/route_handler.rs:178). No caller.

Both are public, so removing them is a breaking change and belongs in a minor bump while the API is still settling at 0.1.x.

Turn the lint on first, then decide item by item. Some public items are meant to be host-facing API with no in-tree caller; those get kept and marked, not deleted. cargo machete (make machete) covers unused dependencies and is advisory today, so include a pass over its output.

Acceptance criteria

  • dead_code moves to deny in [workspace.lints.rust], or stays allow with a recorded reason in docs/lints.md.
  • Every hit is resolved: deleted, or kept with a reason saying who calls it from outside the workspace.
  • remove_route_annotation and with_pdp_router are removed or justified. If removed, the tests that only exist to cover them go too.
  • make machete output is triaged, and genuinely unused deps are dropped.
  • make ci and make coverage pass. Coverage should not drop; deleting uncovered code raises it.
  • CHANGELOG entry for any removed public item.

Metadata

Metadata

Assignees

Labels

choreInfra, dependency updates, etc.

Type

Projects

Status
In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions