ci + code quality: rustfmt, clippy, TS strictness, typed errors, plugin parity - #38
Merged
Conversation
Add rustfmt (--check) and clippy (-D warnings) jobs to CI workflow. Fix existing formatting drift via cargo fmt and resolve clippy warnings (unused variable, too_many_arguments) so current main passes cleanly. Closes #25 https://claude.ai/code/session_01FSQqrGavct9yb6Ddsf9edM
Add script/check-tauri-versions that compares @tauri-apps/plugin-* entries in package.json against tauri-plugin-* in Cargo.toml. Fails on mismatches or unexpected one-sided plugins, with an allowlist for intentional exceptions. Runs as a lightweight CI job on ubuntu-latest. Closes #28 https://claude.ai/code/session_01FSQqrGavct9yb6Ddsf9edM
Split monolithic CI into three workflow files: - rust.yml: fmt, clippy, cargo check, cargo test (macos-latest) - ts.yml: typecheck, frontend build, vitest (ubuntu-latest) - ci.yml: orchestrator for workflow_call + plugin parity check Each workflow triggers independently on push/PR so Rust-only and TS-only regressions fail fast without waiting for unrelated jobs. Closes #24 https://claude.ai/code/session_01FSQqrGavct9yb6Ddsf9edM
…rough Enable noUnusedLocals, noUnusedParameters, and noFallthroughCasesInSwitch in tsconfig.json. Fix pre-existing type errors: add missing AppCommandContext fields in CommandPalette test mock, fix WorkspaceIndexStatus[] return type annotation, and correct ts-rs binding import path in FileAnnotations.ts. Closes #26 https://claude.ai/code/session_01FSQqrGavct9yb6Ddsf9edM
Add CommandError enum with variants for Io, Git, Json, Sidecar, NotFound, and InvalidArgument errors. Replace ad-hoc .map_err(|e| e.to_string()) patterns with idiomatic ? operator using From impls. Migrate annotations, diff, export, files, and git command modules to use CommandResult<T>. Tauri boundary compatibility preserved via From<CommandError> for String. Closes #30 https://claude.ai/code/session_01FSQqrGavct9yb6Ddsf9edM
- Implement From<CommandError> for tauri::ipc::InvokeError (Tauri v2 requires Into<InvokeError>, not Into<String>) - Move FileAnnotations to redpen-core to fix ts-rs cross-crate import path resolution (was generating ../../../../ src/lib/bindings/Annotation) - Fix clippy: use is_some_and instead of map_or, flatten iterator instead of nested if-let - Fix typecheck CI: remove svelte-kit sync (not a SvelteKit project) - Add bun setup to Cargo Test CI job for frontend dependency resolution https://claude.ai/code/session_01FSQqrGavct9yb6Ddsf9edM
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.
Summary
cargo fmt --checkandcargo clippy -D warningsCI jobs; fix all existing formatting drift and clippy warningsscript/check-tauri-versionsparity check between JS and Rust Tauri plugins; run as CI jobrust.ymlandts.ymlworkflows so Rust/TS regressions fail independentlynoUnusedLocals,noUnusedParameters,noFallthroughCasesInSwitchin tsconfig; fix pre-existing type errors in tests and bindingsCommandErrorenum withIo,Git,Json,Sidecar,NotFound,InvalidArgumentvariants; migrate all 5 command modules fromResult<T, String>toCommandResult<T>with idiomatic?operatorTest plan
Rustfmtjob fails on formatting driftClippyjob fails on clippy warningsTypecheckjob fails on unused locals/params and switch fallthroughTauri Plugin Parityjob fails on JS/Rust plugin mismatchesCargo Check,Cargo Test,Build Frontend,Vitestjobs passCloses #24, #25, #26, #28, #30
https://claude.ai/code/session_01FSQqrGavct9yb6Ddsf9edM