Skip to content

Enable clippy::todo lint #89

Description

@tupe12334

What this lint catches

clippy::todo flags any use of the todo!() macro in production code.

todo!() is a convenience macro that panics at runtime with a message like "not yet implemented". It is commonly used as a placeholder while sketching out code, but if accidentally left in a shipped binary it will crash on the first call.

Why it improves code quality

The repo already bans dbg_macro = "deny" for the same reason — leftover debugging helpers must not reach production. todo!() carries the same risk: it compiles silently, hides incomplete logic, and panics at runtime without any static-analysis warning.

Enabling clippy::todo = "deny" turns what would be a runtime panic into a compile-time error, making it impossible to ship unfinished code paths.

Proposed change

Add to [lints.clippy] in Cargo.toml:

# Forbid leftover `todo!` placeholders from reaching production
todo = "deny"

This lint belongs to Clippy's restriction group, is already used alongside dbg_macro in this repo's lint philosophy, and produces zero violations against the current codebase.


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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions