justfile with direct CLI calls, using ninja only to prepare
generated build artifacts that the test commands need.
Quick reference
out/coverage/ (gitignored).
Coverage tools and thresholds
Linux pull requests run
just test --coverage in CI. macOS and Windows
jobs run just test (no coverage enforcement) for now.
Notes
- Rust —
cargo-llvm-covis installed on demand intoout/bin/to avoid polluting the global cargo install. Coverage runs rebuild the workspace with instrumentation, so they are slower than plainjust test-rust. Windows ARM64 (aarch64-pc-windows-msvc) is not supported: the Rust compiler produces malformed.profrawfiles on that target (rust-lang/rust#150123, cargo-llvm-cov#436).just test-rust --coverageexits with a clear message on ARM64 Windows; usejust test-rust(no coverage) or rely on CI (Linux) for enforcement. - Python — coverage is split across two suites (
pylibandqt) because they have differentPYTHONPATHsetups and test folders. - TypeScript — coverage is measured only over code reachable through Vitest’s module graph. Svelte component rendering behavior is not covered.
SonarCloud
SonarCloud runs automatically after successful CI pushes and pull requests. It runs static analysis across Python, TypeScript, and Rust. For internal pull requests and trusted branch pushes, it also aggregates the coverage reports generated by the three stacks.- Dashboard: https://sonarcloud.io/project/overview?id=ankitects_anki
- Internal coverage: uses the same LCOV/XML reports produced by
just test --coverage - Fork coverage: remains enforced in CI but is not imported into SonarCloud
- Analysis results: SonarCloud reports quality gate status on each analyzed PR
Gaps and future improvements
- Raise thresholds gradually as the test suite grows and CI timings stabilise.
- Exclude generated files from coverage denominators where appropriate.
- Publish
out/coverage/as a CI artifact so reviewers can browse HTML reports directly from a PR. - Consider diff/changed-file coverage once baselines are stable — it is a better enforcement mechanism for incremental improvement than whole-repo thresholds.
- Add component or browser tests for Svelte UI surfaces if Svelte coverage is intended to cover rendered component behaviour.