Skip to content

chore: clippy is disabled and has a 61-site backlog blocking -D warnings #573

Description

@sanity

Problem

cargo clippy --workspace --all-targets -- -D warnings does not pass, and the clippy workflow is checked in as .github/workflows/clippy.yml.disabled, so nothing catches new lints. Found while verifying #572, where the only way to get clippy coverage over the changed code was to allow the lints that stop it early.

Measured on main @ 9e663e3 with rustc/clippy 1.94.1 (the rust-toolchain.toml pin):

It stops at 7 errors in river-core, so ui/ and cli/ are never linted at all:

lint count site
clippy::doc_lazy_continuation 5 common/src/room_state/ban.rs:41-45
clippy::assertions_on_constants 1 common/src/room_state/dm_body.rs:358
clippy::repeat_once 1 common/src/room_state/message.rs:2116

Allowing those three lets it finish, and it finds 54 more across 17 files:

 12  ui/src/room_data.rs
  6  ui/src/components/conversation.rs
  5  ui/src/components/app/chat_delegate.rs
  5  ui/src/components/app/notifications.rs
  5  ui/src/util/confusable.rs
  4  ui/src/components/app/freenet_api/response_handler/get_response.rs
  3  ui/src/components/room_list/receive_invitation_modal.rs
  2  common/tests/dm_global_cap_test.rs
  2  cli/src/commands/debug.rs
  2  cli/src/version_check.rs
  2  ui/src/nickname.rs
  1  cli/src/api.rs
  1  ui/src/components/room_list/dm_rail_section.rs
  1  ui/src/components/app/freenet_api/room_synchronizer.rs
  1  ui/src/signing.rs
  1  ui/src/util/signal_guard.rs
  1  ui/src/util.rs

Reproduce:

cargo clippy --workspace --all-targets -- -D warnings
cargo clippy --workspace --all-targets -- -D warnings \
  -A clippy::doc_lazy_continuation -A clippy::assertions_on_constants -A clippy::repeat_once

Why it matters

The backlog is the reason the workflow is disabled, and the disabled workflow is the reason the backlog grows — so it does not resolve on its own. The concrete cost today is that a PR touching ui/ or cli/ gets no clippy signal on its own changes without hand-allowing unrelated lints first, which is easy to skip and easy to get wrong.

None of these look like real bugs on inspection — they are style and doc-formatting lints (doc_lazy_continuation, useless_vec, needless_borrows_for_generic_args, unused_mut, nonminimal_bool, repeat_once). That is what makes them safe to clear in one pass, and it is also why they should not ride along inside unrelated feature/fix PRs (AGENTS.md: one logical change per PR).

Suggested shape

  1. One chore(lint): PR clearing all 61 sites, no behaviour change.
  2. Re-enable clippy.yml in the same PR so the count cannot regress.

Not urgent, but it should be someone's deliberate task rather than a thing every PR author rediscovers.

[AI-assisted - Claude]

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