run-tests-and-linters
Run the full quality gate for SkillKeeper. The project is a Rust workspace
(crates + the Tauri backend) plus a small TypeScript surface (the renderer and
the packages/i18n catalogs), so the gate has both a Rust half and a
TypeScript half.
Steps
Ensure dependencies are installed.
pnpm installThe stable Rust toolchain is pinned in
rust-toolchain.tomland installed by rustup on firstcargoinvocation. Ifpnpm installfails, report the error and stop -- later steps will not produce meaningful results.Run the Rust gates.
cargo fmt --all --check # formatting cargo clippy --workspace --all-targets -- -D warnings # lints; warnings fail (matches CI) cargo test --workspace # tests; also regenerates the ts-rs bindingsAny
cargo fmt --checkdiff, clippy warning, or failed test is a blocker. Report each with its crate, file path, and line number. Note thatcargo testregenerates the TypeScript bindings underapps/desktop/src/renderer/services/bridge/generated/; if that leaves a dirty working tree, the bindings were stale and must be committed.Run ESLint.
pnpm lintCollect any errors or warnings. ESLint errors are blockers; warnings should be reported but are not blocking unless the lint script is configured to treat them as errors.
Run TypeScript typecheck.
pnpm typecheckAny type error is a blocker. Report each error with its file path and line number.
Run tests with coverage.
pnpm test:covThe Vitest v8 coverage gate requires 90% lines and 90% branches; it is scoped to
packages/i18n(seevitest.config.ts). If the gate fails:- Show the coverage summary table.
- Identify which files are below threshold.
- Clearly state that the coverage gate is blocking the release.
Build the renderer.
pnpm --filter @skillkeeper/desktop frontend:build # vite buildA failed frontend build is a blocker.
Report. Produce a structured summary:
cargo fmt: PASS / FAIL cargo clippy: PASS / FAIL (N warnings) cargo test: PASS / FAIL (N failed, N passed) lint: PASS / FAIL (N errors, N warnings) typecheck: PASS / FAIL (N errors) tests: PASS / FAIL (N failed, N passed) coverage: PASS / FAIL (lines X%, branches X% -- threshold 90%) frontend: PASS / FAIL Overall: PASS / FAILFor each failure include the relevant output excerpt so the developer can act on it immediately.