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.

Activity

  1. github-actions commented on Jun 19, 2026

    @github-actions

    A workspace is ready for this issue.

    Open workspace →

    Powered by Worktree · Install

  2. tupe12334 commented on Jun 19, 2026

    @tupe12334
    MemberAuthor

    Closing without a PR this cycle: on the current toolchain (clippy 1.96) the crate's existing group-level pedantic/nursery deny config already fails its own pre-commit cargo clippy gate due to newly-added lints (duration_suboptimal_units, map_unwrap_or) that are unrelated to this proposal. Adding clippy::todo can't pass the gate without also resolving those pre-existing failures, which is out of scope for a single-lint change. Re-propose once the toolchain-drift warnings are addressed separately.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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