ci: add clippy gate and fix all clippy lints - #540
Merged
Conversation
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
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)
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 clippycould not pass.What this does
never_loop— in non-plugin builds the--loopbody's sole match arm returns (the loopingModelSwaparm is#[cfg(feature = "plugin")]). Scoped the allow tonot(feature = "plugin").--all-targets):clippy --fixfor the mechanical set (incl.items_after_test_modulerelocations — pure moves),field_reassign_with_default→ struct-update,type_complexity→ type aliases,drop_non_drop→let _ = ctx, twoawait_holding_lockreads cloned out of the guard + two serialization-guard tests get scoped allows, and the threshold-ordering tests become compile-timeconst _asserts.clippyjob linting default + windows-default with-D warnings.dap/sandbox-microvm/--all-featurescoverage 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→ cleanThe large
src/session/storage.rsdiff is a pure test-module relocation byclippy --fix(1478 lines before/after).