You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: clippy only lints the app crate, and mas-agent already fails it #772
$ cd src-tauri && cargo clippy --workspace --all-targets -- -D warnings
error: items after a test module
--> crates/mas-agent/src/claude.rs:367:1
|
367 | mod tests {
In crates/mas-agent/src/claude.rs, #[cfg(test)] mod tests opens at line 366, but ClaudeSession (line 662), its impl (668) and spawn (737) come after it, at the end of the file.
Why CI didn't catch it
ci.yml's "Rust clippy" step runs cargo clippy --all-targets --all-features -- -D warnings in src-tauri. That directory's Cargo.toml is both the workspace root and the sqlpilot package, and with no default-members, a bare cargo clippy lints only that package. The six crates/mas-* crates are never linted in CI. just lint names them with -p, but it skips --all-targets, so test code goes unchecked there too.
Fix
Move ClaudeSession and spawn above the tests module in crates/mas-agent/src/claude.rs.
Add --workspace to the CI clippy step (cargo clippy --workspace --all-targets --all-features -- -D warnings). Make just lint match, so local and CI runs check the same thing.
Fix anything else the wider run turns up in the same PR. That step will then catch the next regression of this kind.
Found while preparing the 1.3.0 release (#771). It doesn't block that release.
Activity