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

Activity

  1. github-actions commented on Jun 26, 2026

    @github-actions

    A workspace is ready for this issue.

    Open workspace →

    Powered by Worktree · Install

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