Skip to main content

Crate fallow_core

Crate fallow_core 

Source
Expand description

fallow-core is the internal implementation crate behind the fallow analyzer. External embedders should consume the curated programmatic surface at fallow_cli::programmatic (e.g. detect_dead_code, detect_boundary_violations, detect_duplication, compute_complexity, compute_health); each returns a serde_json::Value matching the CLI’s --format json shape plus structured ProgrammaticError with the CLI’s exit-code ladder. See decisions/008-fallow-core-internal-policy.md for the policy, and docs/fallow-core-migration.md for the function-by-function migration map. Items in this crate may change in any release, including patch releases; a subsequent minor will flip publish = false so the crate is no longer fetchable from crates.io.

Modules§

analyze
cache
Re-exports from fallow-extract::cache.
changed_files
Git-aware “changed files” filtering shared between fallow-cli and fallow-lsp.
churn
Git churn analysis for hotspot detection.
cross_reference
Cross-reference duplication findings with dead code analysis results.
discover
duplicates
Code duplication / clone detection module.
extract
Re-exports from fallow-extract.
git_env
Helpers for invoking git from fallow without inheriting ambient repo state from the parent process.
graph
Module dependency graph with re-export chain propagation and reachability analysis.
plugins
Plugin system for framework-aware codebase analysis.
project
Centralized project state with file registry and workspace metadata.
resolve
Import specifier resolution using oxc_resolver.
results
suppress
trace

Structs§

AnalysisOutput
Result of the full analysis pipeline, including optional performance timings.

Functions§

analyzeDeprecated
Run the full analysis pipeline.
analyze_projectDeprecated
Run analysis on a project directory (with export usages for LSP Code Lens).
analyze_retaining_modulesDeprecated
Run the full analysis pipeline, retaining parsed modules and discovered files.
analyze_with_file_hashesDeprecated
Run the full analysis pipeline and return the full AnalysisOutput, including file_hashes (used by fallow fix to detect on-disk drift between analysis and per-file write). Graphs and modules are NOT retained; the only difference from analyze is that the caller can access AnalysisOutput.file_hashes.
analyze_with_parse_resultDeprecated
Run the analysis pipeline using pre-parsed modules, skipping the parsing stage.
analyze_with_traceDeprecated
Run the full analysis pipeline with optional performance timings and graph retention.
analyze_with_usagesDeprecated
Run the full analysis pipeline with export usage collection (for LSP Code Lens).
config_for_project
Resolve the analysis config for a project, mirroring the CLI’s --config behavior when config_path is provided.
resolve_cache_max_size_bytes
Resolve config.cache_max_size_mb into bytes, falling back to the extract crate’s DEFAULT_CACHE_MAX_SIZE. Lives at this layer (not on ResolvedConfig) because fallow-config does not depend on fallow-extract; the bytes conversion is owned by the cache callsite. Public so CLI subcommands that load the cache directly (flags, health, coverage analyze) can call it without re-deriving the same fallback policy.