Skip to content

Enable clippy::todo lint #88

Description

@tupe12334

Summary

Enable the clippy::todo lint (deny level) to prevent unfinished todo!() placeholder macros from being merged into production code.

What it catches

clippy::todo flags any use of the todo!() macro. todo!() is meant as a temporary, compile-time-OK placeholder during development — it panics at runtime ("not yet implemented"). When one accidentally survives review and ships, an end user triggers a hard panic instead of real behavior.

Why it improves code quality

  • A leftover todo!() is a latent runtime panic — the compiler accepts it, so nothing catches it without this lint.
  • It is exactly the same class of "leftover dev artifact" the crate already guards against with dbg_macro = "deny". This extends that intent.
  • Cost is zero today: the crate currently has no todo!() usages, so enabling this at deny introduces no violations and no code churn. It is purely a guardrail against future regressions.

It belongs to Clippy's opt-in restriction group, so it is not covered by the pedantic / nursery / cargo groups already enabled in Cargo.toml.

Proposed change

Add to the existing [lints.clippy] table in Cargo.toml, beside dbg_macro:

# Forbid leftover `todo!()` placeholder macros from reaching production
todo = "deny"

A PR implementing this follows.


This issue was opened by the "Clippy lint improvements → issue + PR (Rust repos) → Slack" routine of moadim.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions