pub struct ResolvedConfig {Show 51 fields
pub root: PathBuf,
pub entry_patterns: Vec<String>,
pub ignore_patterns: IgnorePatternSet,
pub user_ignore_pattern_count: usize,
pub ignore_findings: FindingIgnoreMatcher,
pub output: OutputFormat,
pub cache_dir: PathBuf,
pub threads: usize,
pub no_cache: bool,
pub cache_max_size_mb: Option<u32>,
pub cache_config_hash: u64,
pub ignore_dependencies: IgnoreDependencyMatcher,
pub ignore_command_entries: Vec<String>,
pub ignore_unresolved_imports: Vec<GlobMatcher>,
pub ignore_export_rules: Vec<IgnoreExportRule>,
pub compiled_ignore_exports: Vec<CompiledIgnoreExportRule>,
pub compiled_ignore_catalog_references: Vec<CompiledIgnoreCatalogReferenceRule>,
pub compiled_ignore_dependency_overrides: Vec<CompiledIgnoreDependencyOverrideRule>,
pub ignore_exports_used_in_file: IgnoreExportsUsedInFileConfig,
pub used_class_members: Vec<UsedClassMemberRule>,
pub ignore_decorators: Vec<String>,
pub unused_component_props_ignore: Option<Regex>,
pub circular_dependencies: CircularDependenciesConfig,
pub duplicates: DuplicatesConfig,
pub similar_code: SimilarCodeConfig,
pub health: HealthConfig,
pub type_aware: TypeAwareConfig,
pub rules: RulesConfig,
pub boundaries: ResolvedBoundaryConfig,
pub rule_packs: Vec<RulePackDef>,
pub rule_pack_sources: Vec<PathBuf>,
pub production: bool,
pub quiet: bool,
pub external_plugins: Vec<ExternalPluginDef>,
pub dynamically_loaded: Vec<String>,
pub overrides: Vec<ResolvedOverride>,
pub workspace_changed_since: BTreeMap<String, String>,
pub regression: Option<RegressionConfig>,
pub audit: AuditConfig,
pub codeowners: Option<String>,
pub public_packages: Vec<String>,
pub flags: FlagsConfig,
pub security: SecurityConfig,
pub fix: FixConfig,
pub resolve: ResolveConfig,
pub include_entry_exports: bool,
pub auto_imports: bool,
pub fail_on_parse_error: bool,
pub max_file_size_bytes: Option<u64>,
pub analysis_snapshot: AnalysisSnapshot,
pub detection_config_digest: String,
}Expand description
Fully resolved configuration with all globs pre-compiled.
Fields§
§root: PathBufProject root every analysis path resolves against.
entry_patterns: Vec<String>Manual entry-point globs from the entry config key, matched against
discovered files on top of plugin- and manifest-derived entries.
ignore_patterns: IgnorePatternSetCompiled union of user ignorePatterns and the built-in default
ignores (node_modules, dist, minified bundles, …); matching files
are excluded from discovery entirely, unless a ! entry in
ignorePatterns lifts them (issue #2940).
user_ignore_pattern_count: usizeHow many globs at the FRONT of Self::ignore_patterns came from the
user’s ignorePatterns (the ! exceptions are not globs of this
union and do not count). The rest, in order, are
DEFAULT_IGNORE_PATTERNS.
Source discovery needs the split to answer “which pattern removed this file”: a match index below this count is the project’s own explicit choice and is reported nowhere, while an index at or above it names a built-in the user never asked for (issue #2638).
ignore_findings: FindingIgnoreMatcherPost-analysis finding-path matcher built from ignoreFindings; hides
findings without removing files from the module graph.
output: OutputFormatOutput format for this run, passed through from the CLI at resolve time.
cache_dir: PathBufCache directory: cache.dir resolved against the root, or the default
<root>/.fallow.
threads: usizeWorker-thread count, passed through from the CLI at resolve time.
no_cache: boolWhen true, skip reading and writing the persistent caches for this run.
cache_max_size_mb: Option<u32>Extraction-cache size ceiling in megabytes (None = no ceiling), from
the CLI override, FALLOW_CACHE_MAX_SIZE, or cache.maxSizeMb.
cache_config_hash: u64Hash over extraction-affecting config (the sorted external plugin names), mixed into cache keys so plugin changes invalidate cached extractions instead of serving stale results.
ignore_dependencies: IgnoreDependencyMatcherPackage names and package-name globs excluded from both unused-dependency and unlisted-dependency detection.
ignore_command_entries: Vec<String>Command names whose file arguments do not become entry points; *
matches every command.
ignore_unresolved_imports: Vec<GlobMatcher>Compiled globs matched against raw import specifiers (not filesystem
paths) whose unresolved-import findings are suppressed.
ignore_export_rules: Vec<IgnoreExportRule>Raw ignoreExports rules as configured, kept alongside the compiled
form for surfaces that need the original glob text (config editing,
diagnostics).
compiled_ignore_exports: Vec<CompiledIgnoreExportRule>ignoreExports rules with their file globs pre-compiled for matching.
compiled_ignore_catalog_references: Vec<CompiledIgnoreCatalogReferenceRule>ignoreCatalogReferences rules with consumer globs pre-compiled.
compiled_ignore_dependency_overrides: Vec<CompiledIgnoreDependencyOverrideRule>ignoreDependencyOverrides rules ready for matching.
ignore_exports_used_in_file: IgnoreExportsUsedInFileConfigSame-file-use suppression setting for unused-export.
used_class_members: Vec<UsedClassMemberRule>Class-member names, globs, or heritage-scoped rules treated as
framework-used and exempt from unused-class-member.
ignore_decorators: Vec<String>Decorator names stripped of the automatic unused-class-member
exemption that decorated members otherwise receive.
unused_component_props_ignore: Option<Regex>Compiled regex matched against each declared component prop’s local
destructure binding name; a matching prop is exempted from
unused-component-props. None when unusedComponentProps.ignorePattern
is unset. Compiled from the validated raw pattern in Self::resolve.
circular_dependencies: CircularDependenciesConfigOptions for the circular-dependencies rule, passed through unchanged.
duplicates: DuplicatesConfigClone-detection settings, passed through unchanged.
similar_code: SimilarCodeConfigExplicit similar-code candidate settings, passed through unchanged.
health: HealthConfigHealth and complexity thresholds, passed through unchanged.
type_aware: TypeAwareConfigTypeScript semantic-analysis opt-in, passed through unchanged.
rules: RulesConfigPer-rule severities with production-mode adjustments applied: when
Self::production is set, unused-dev-dependencies and
unused-optional-dependencies are forced to off.
boundaries: ResolvedBoundaryConfigResolved architecture boundaries: preset expanded (honoring the
tsconfig rootDir), auto-discovered zones added, and rules validated.
rule_packs: Vec<RulePackDef>Rule packs loaded from the rulePacks config key, in config order.
Validated at config load (load_rule_packs is also the validation
gate in the CLI and programmatic entry points); a pack that fails to
load here is skipped with a tracing::error! as defense in depth.
rule_pack_sources: Vec<PathBuf>Source paths from the rulePacks config key, index-aligned with
Self::rule_packs when every configured pack loaded successfully.
production: boolProduction mode for this analysis pass: test/spec/story/dev files are
excluded from discovery. Out of FallowConfig::resolve this is the
global production bool (super::ProductionConfig::global); the
per-analysis object form and CLI/env overrides are applied post-resolve.
quiet: boolQuiet mode from the CLI: suppress non-essential progress and warning output.
external_plugins: Vec<ExternalPluginDef>External plugin definitions: inline framework entries plus those
discovered from plugins paths, .fallow/plugins/, and root
fallow-plugin-* files (first occurrence of a name wins).
dynamically_loaded: Vec<String>Globs for files loaded dynamically at runtime; matching files are seeded as entry points so they stay reachable.
overrides: Vec<ResolvedOverride>Per-file severity overrides with globs pre-compiled, in config order.
workspace_changed_since: BTreeMap<String, String>Authored Git baseline refs keyed by workspace root; validated against discovered packages when an analysis requests package-scoped changes.
regression: Option<RegressionConfig>Saved regression baseline for --fail-on-regression, when embedded.
audit: AuditConfigIn-repo fallow audit defaults, passed through unchanged.
codeowners: Option<String>Configured CODEOWNERS path override; None probes the standard
locations.
public_packages: Vec<String>Workspace package names (or globs over them) whose public API is treated as externally consumed, making their export surface a reachability root.
flags: FlagsConfigFeature-flag detection settings, passed through unchanged.
security: SecurityConfigSecurity catalogue scoping with requestReceivers normalized
(trimmed, lowercased, deduplicated).
fix: FixConfigfallow fix behavior settings, passed through unchanged.
resolve: ResolveConfigModule-resolver settings (extra exports conditions), passed through
unchanged.
include_entry_exports: boolWhen true, entry-point exports are subject to unused-export
detection instead of being auto-credited as used.
auto_imports: boolWhen true, drop Nuxt convention entry-pattern fallbacks that
nuxt.config does not explicitly declare; auto-import graph edges are
synthesized regardless.
fail_on_parse_error: boolWhen true, a source file that did not parse cleanly fails the run
through the parse-error gate. The CLI flag --fail-on-parse-error
arms the same gate.
max_file_size_bytes: Option<u64>Source files strictly larger than this many bytes are skipped at
discovery (never read, parsed, or analyzed), guarding against the
out-of-memory blowup a single multi-MB generated/vendored/bundled file
causes (issue #1086). None means no limit. Declaration files
(.d.ts/.d.mts/.d.cts) are exempt regardless of size because they
are reachability roots for global types. Defaults to
DEFAULT_MAX_FILE_SIZE_MB MB; the CLI overrides it post-resolve from
--max-file-size / FALLOW_MAX_FILE_SIZE (0 = unlimited).
analysis_snapshot: AnalysisSnapshotWhich revision this analysis pass describes. Always
AnalysisSnapshot::Current out of FallowConfig::resolve; the CLI
sets AnalysisSnapshot::Base post-resolve for the isolated
audit --base pass so diagnostics can name the base revision.
detection_config_digest: StringA stable hash of the config that decides which dead-code findings a
run reports: the merged user config after extends, without the keys
that only shape other commands or output, plus the loaded external
plugin and rule pack definitions. It holds no path of this machine,
so two checkouts of one commit give the same value. Settings that a
surface changes after resolution (for example --include-entry-exports)
are not in it; the analysis fingerprint adds them.
Implementations§
Source§impl ResolvedConfig
impl ResolvedConfig
Sourcepub fn apply_package_baselines_env(&mut self, raw: Option<&OsStr>)
pub fn apply_package_baselines_env(&mut self, raw: Option<&OsStr>)
Apply a FALLOW_PACKAGE_BASELINES value: a false value empties
workspaces.changedSince, so no run of the process reads the map.
Sourcepub fn override_cache_dir(&mut self, dir: PathBuf)
pub fn override_cache_dir(&mut self, dir: PathBuf)
Replace the resolved cache directory with a host override, such as
FALLOW_CACHE_DIR. A relative path resolves from the project root,
the same base as cache.dir.
Give this project root its own subdirectory when the cache directory is outside the root.
A host that analyzes more than one root in one process, such as the
language server with a multi-root workspace, calls this. Without it,
the roots write the same cache.bin and graph-cache.bin, and each
save replaces the cache of the other root. The CLI does not call it,
so a shared CI cache stays valid when the checkout path changes. A
cache directory inside the root already belongs to that root and
stays unchanged.
Sourcepub fn resolve_rules_for_path(&self, path: &Path) -> RulesConfig
pub fn resolve_rules_for_path(&self, path: &Path) -> RulesConfig
Resolve the effective rules for a given file path. Starts with base rules and applies matching overrides in order.