Skip to main content

Module commands

Module commands 

Source
Expand description

Per-command lib API: each subcommand of the rs-hack CLI is exposed here as pub fn run(args: …Args) -> Result<…Result> so embedders (MCP server, yah, tests) can drive the same logic without shelling out. The CLI in main.rs is a thin clap → struct → run() translator that adds rendering on top.

Modules§

doc_coverage
doc-coverage command: report missing doc-comments for public items.
find
find command as a lib API. Returns structured matches; rendering (text, snippets, hints) is the caller’s job — see main.rs for the CLI renderer.
match_audit
match-audit command: detect match expressions that are missing enum variants.
neighbors
neighbors command: pure filesystem discovery of related files. No AST parsing — finds siblings, twin dirs, and test files for any .rs file.
summary
summary command: print a module inventory for a single .rs file.