Skip to main content

Module scan

Module scan 

Source
Expand description

Directory scanning: walk a tree, pre-filter by glob and by content, then parse matching files into Tasks.

This is the half of the old main.rs that has nothing to do with being a command-line program. It takes ScanOptions rather than the parsed CLI so embedders — notably an Android build, where no process can be spawned — drive the same code path the binary does.

Structs§

ScanOptions
Inputs to scan_directory. The defaults match the CLI’s own defaults, so an embedder that only wants “scan this directory the way the tool does” writes ScanOptions::default().
ScanOutcome
What a scan produced: the tasks themselves plus the diagnostics the CLI prints as its per-run summary. Embedders can ignore stats, but it is the only channel that reports skipped and failed files, so dropping it silently would hide a partial result.

Functions§

scan_directories
Scan several roots in one run and return the tasks of all of them.
scan_directory
Scan dir and return the tasks found in it.
validate_dir
Validate that a scan root points to an existing directory and canonicalize it. Exposed because the binary validates --dir before it opens the run span, so the error surfaces before any log line mentions the directory.