Skip to content

ci: add clippy gate and fix all clippy lints - #540

Merged
yogthos merged 1 commit into
dirge-code:mainfrom
oknyshuk:clippy-ci
Jun 29, 2026
Merged

ci: add clippy gate and fix all clippy lints#540
yogthos merged 1 commit into
dirge-code:mainfrom
oknyshuk:clippy-ci

Conversation

@oknyshuk

Copy link
Copy Markdown
Contributor

CI ran rustfmt + cargo build/test under RUSTFLAGS=-D warnings but never ran clippy, so clippy lints (incl. the deny-by-default correctness group) had no gate and accumulated. cargo clippy could not pass.

What this does

  • main.rs: the only outright failure was never_loop — in non-plugin builds the --loop body's sole match arm returns (the looping ModelSwap arm is #[cfg(feature = "plugin")]). Scoped the allow to not(feature = "plugin").
  • Cleared all 67 remaining warnings on default + windows-default (--all-targets): clippy --fix for the mechanical set (incl. items_after_test_module relocations — pure moves), field_reassign_with_default → struct-update, type_complexity → type aliases, drop_non_droplet _ = ctx, two await_holding_lock reads cloned out of the guard + two serialization-guard tests get scoped allows, and the threshold-ordering tests become compile-time const _ asserts.
  • .github/workflows/ci.yml: new clippy job linting default + windows-default with -D warnings. dap / sandbox-microvm / --all-features coverage is left as a follow-up (extra native deps).

Verification (stable toolchain, matching CI)

  • cargo +stable clippy --all-targets -- -D warnings → 0 warnings (default and windows-default)
  • cargo +stable fmt --all --check → clean
  • targeted tests pass (panels, permission checker, storage, session_search, context_manager)

The large src/session/storage.rs diff is a pure test-module relocation by clippy --fix (1478 lines before/after).

CI ran rustfmt + cargo build/test under RUSTFLAGS=-D warnings but never ran clippy, so clippy lints (including the deny-by-default correctness group) had no gate and had accumulated. cargo clippy could not even pass.

main.rs: the only thing failing clippy outright was never_loop -- in non-plugin builds the --loop body's sole match arm returns (the looping ModelSwap arm is #[cfg(feature=plugin)]). Scoped the allow to not(feature=plugin).

Cleared all 67 remaining warnings (default + windows-default, --all-targets): clippy --fix for the mechanical set (incl. items_after_test_module relocations -- pure moves), field_reassign_with_default -> struct-update, type_complexity -> type aliases, drop_non_drop -> let _ = ctx, two await_holding_lock reads cloned out of the guard + two serialization-guard tests get scoped allows, and the threshold-ordering tests become compile-time const _ asserts.

.github/workflows/ci.yml: new clippy job linting default + windows-default with -D warnings. dap / sandbox-microvm / --all-features coverage left as a follow-up (extra native deps).

Verified: clippy clean on both feature configs; 140 targeted tests pass; cargo fmt --all --check clean.
@yogthos
yogthos merged commit b8cd3c7 into dirge-code:main Jun 29, 2026
25 of 26 checks passed
yogthos pushed a commit that referenced this pull request Jun 30, 2026
PTY-backed !/!! bang commands (interactive gh/editors, vt100 in-place
render), /prompt <name> <text> runs the text, write_todo_list backed by
the issue board, clipboard copied tooltip, CI clippy gate, visible failed
MCP servers, stream retry on mid-tool-call chunk timeouts, and bounded DB
loads in agent construction. (#538, #539, #540, #541, #542, #544, #546, #547)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants