Check Rust Coverage
Testing & Qualitycheck-rust-coverageCheck Rust Coverage is an Agent Skill for testing & quality published in the RediSearch/RediSearch repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Check which Rust lines are not covered by Rust tests. Use this when you developed new Rust code and want to ensure it is tested.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/RediSearch/RediSearch/blob/HEAD/.skills/check-rust-coverage/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/check-rust-coverage, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Check Rust Coverage
Determine which Rust lines are not covered by Rust tests.
Arguments
<path>: Path to a Rust crate.<path 1> <path 2>: Multiple crate paths.
If a path doesn't include src/, assume it to be in the src/redisearch_rs directory. E.g. numeric_range_tree becomes src/redisearch_rs/numeric_range_tree.
If a path points to a directory, consider all Rust crates in that directory.
Instructions
Run
cargo llvm-cov test --manifest-path <crate_directory>/Cargo.toml --quiet --json 2>/dev/null | jq -r '"Uncovered Lines:",
(.data[0].files[] |
select(.summary.lines.percent < 100) |
.filename as $f |
[.segments[] | select(.[2] == 0 and .[4] == true) | .[0]] |
unique |
if length > 0 then "\($f): \(join(", "))" else empty end
)'
to get the list of uncovered lines for each file in the target crate.