Skip to main content

Module walker

Module walker 

Source
Expand description

Filesystem walker — discovers Rust source files for analysis, respecting .gitignore and user-provided exclude patterns.

Lives in crap-core even though it carries a hardcoded .rs extension filter today: the only AST-purity gate that matters here is “no syn / quote / tree_sitter / swc / oxc imports.” ignore::WalkBuilder is purely filesystem-walking machinery and satisfies that gate. The .rs literal is a function-body wart that analyze<P: ParseDiagnostic> will parameterize in S4 once the parse-diagnostic type can carry the language-specific extension(s) it consumes.

Extracted from crates/crap4rs/src/core/mod.rs::discover_rust_files during S3 (crap4rs#135) so that S4’s relocation of core::analyze to crap-core doesn’t need to upward-import from the Rust adapter.

Functions§

discover_rust_files
Walk the source directory and collect all .rs files, respecting .gitignore and user-provided exclude patterns.