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
gitfrom 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§
- Analysis
Output - Result of the full analysis pipeline, including optional performance timings.
Functions§
- analyze
Deprecated - Run the full analysis pipeline.
- analyze_
project Deprecated - Run analysis on a project directory (with export usages for LSP Code Lens).
- analyze_
retaining_ modules Deprecated - Run the full analysis pipeline, retaining parsed modules and discovered files.
- analyze_
with_ file_ hashes Deprecated - Run the full analysis pipeline and return the full
AnalysisOutput, includingfile_hashes(used byfallow fixto detect on-disk drift between analysis and per-file write). Graphs and modules are NOT retained; the only difference fromanalyzeis that the caller can accessAnalysisOutput.file_hashes. - analyze_
with_ parse_ result Deprecated - Run the analysis pipeline using pre-parsed modules, skipping the parsing stage.
- analyze_
with_ trace Deprecated - Run the full analysis pipeline with optional performance timings and graph retention.
- analyze_
with_ usages Deprecated - 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
--configbehavior whenconfig_pathis provided. - resolve_
cache_ max_ size_ bytes - Resolve
config.cache_max_size_mbinto bytes, falling back to the extract crate’sDEFAULT_CACHE_MAX_SIZE. Lives at this layer (not onResolvedConfig) becausefallow-configdoes not depend onfallow-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.