Skip to main content

ResolvedConfig

Struct ResolvedConfig 

Source
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: PathBuf

Project 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: IgnorePatternSet

Compiled 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: usize

How 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: FindingIgnoreMatcher

Post-analysis finding-path matcher built from ignoreFindings; hides findings without removing files from the module graph.

§output: OutputFormat

Output format for this run, passed through from the CLI at resolve time.

§cache_dir: PathBuf

Cache directory: cache.dir resolved against the root, or the default <root>/.fallow.

§threads: usize

Worker-thread count, passed through from the CLI at resolve time.

§no_cache: bool

When 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: u64

Hash 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: IgnoreDependencyMatcher

Package 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: IgnoreExportsUsedInFileConfig

Same-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: CircularDependenciesConfig

Options for the circular-dependencies rule, passed through unchanged.

§duplicates: DuplicatesConfig

Clone-detection settings, passed through unchanged.

§similar_code: SimilarCodeConfig

Explicit similar-code candidate settings, passed through unchanged.

§health: HealthConfig

Health and complexity thresholds, passed through unchanged.

§type_aware: TypeAwareConfig

TypeScript semantic-analysis opt-in, passed through unchanged.

§rules: RulesConfig

Per-rule severities with production-mode adjustments applied: when Self::production is set, unused-dev-dependencies and unused-optional-dependencies are forced to off.

§boundaries: ResolvedBoundaryConfig

Resolved 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: bool

Production 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: bool

Quiet 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: AuditConfig

In-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: FlagsConfig

Feature-flag detection settings, passed through unchanged.

§security: SecurityConfig

Security catalogue scoping with requestReceivers normalized (trimmed, lowercased, deduplicated).

§fix: FixConfig

fallow fix behavior settings, passed through unchanged.

§resolve: ResolveConfig

Module-resolver settings (extra exports conditions), passed through unchanged.

§include_entry_exports: bool

When true, entry-point exports are subject to unused-export detection instead of being auto-credited as used.

§auto_imports: bool

When 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: bool

When 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: AnalysisSnapshot

Which 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: String

A 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

Source

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.

Source

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.

Source

pub fn scope_shared_cache_dir_to_root(&mut self)

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.

Source

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.

Trait Implementations§

Source§

impl Clone for ResolvedConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ResolvedConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more