Skip to main content

Crate fallow_config

Crate fallow_config 

Source

Modules§

glob_validation
Validation of user-supplied glob patterns from the config file.
levenshtein
Levenshtein-distance helpers for typo detection across config surfaces.

Structs§

AuditConfig
Per-analysis baseline paths for the audit command.
AuthoredRule
Pre-expansion from-rule preserved on a LogicalGroup. Surfaces the user’s original intent ({ from: "features", allow: ["shared"] }) even after expand_auto_discover rewrote it into per-child rules (features/auth -> shared, features/billing -> shared).
BoundaryConfig
Architecture boundary configuration.
BoundaryRule
An import rule between zones.
BoundaryZone
A named zone grouping files by directory pattern.
CacheConfig
Incremental cache configuration.
CatalogFixConfig
Auto-fix behavior for pnpm catalog entries.
CompiledIgnoreCatalogReferenceRule
IgnoreCatalogReferenceRule with the optional consumer glob pre-compiled.
CompiledIgnoreDependencyOverrideRule
IgnoreDependencyOverrideRule ready for matching.
CompiledIgnoreExportRule
IgnoreExportRule with the glob pre-compiled into a matcher.
ConfigOverride
Per-file override entry.
DuplicatesConfig
Configuration for code duplication detection.
ExternalPluginDef
A declarative plugin definition loaded from a standalone file or inline config.
ExternalUsedExport
Exports considered used for files matching a pattern.
FallowConfig
User-facing configuration loaded from .fallowrc.json, .fallowrc.jsonc, fallow.toml, or .fallow.toml.
FixConfig
Auto-fix behavior settings.
FlagsConfig
Feature flag detection configuration.
HealthConfig
Configuration for complexity health metrics (fallow health).
IgnoreCatalogReferenceRule
Rule for suppressing an unresolved-catalog-reference finding.
IgnoreDependencyOverrideRule
Rule for suppressing an unused-dependency-override or misconfigured-dependency-override finding.
IgnoreExportRule
Rule for ignoring specific exports.
IgnoreExportsUsedInFileByKind
Knip-compatible ignoreExportsUsedInFile object form.
LogicalGroup
A user-declared zone that fanned out into one or more child zones via autoDiscover. Surfaced verbatim through fallow list --boundaries --format json so consumers (config UIs, Sankey renderers, agent-driven config tooling, dashboards) can reconstruct the original grouping intent after expansion has flattened the parent name out of zones[].
NormalizationConfig
Fine-grained normalization overrides.
OwnershipConfig
Configuration for ownership analysis (fallow health --hotspots --ownership).
PackageJson
Parsed package.json with fields relevant to fallow.
ParsedOverrideKey
Parsed structure of an override key.
PartialRulesConfig
Partial per-issue-type severity for overrides. All fields optional.
PerAnalysisProductionConfig
Per-analysis production-mode defaults.
PnpmCatalog
A single catalog (the default or a named one).
PnpmCatalogData
Structured catalog data extracted from a pnpm-workspace.yaml file.
PnpmCatalogEntry
A single entry inside a catalog.
PnpmCatalogGroup
A named catalog group under catalogs: with no package entries.
PnpmOverrideData
Structured override data extracted from one source.
PnpmOverrideEntry
A single override entry.
RedundantRootPrefix
One offending redundant-root-prefix pattern in a boundaries.zones[] entry.
RegressionBaseline
Per-type issue counts for regression comparison.
RegressionConfig
Regression baseline counts, embedded in the config file.
ResolveConfig
Module resolver configuration.
ResolvedBoundaryConfig
Resolved boundary config with pre-compiled glob matchers.
ResolvedBoundaryRule
A resolved boundary rule.
ResolvedConfig
Fully resolved configuration with all globs pre-compiled.
ResolvedNormalization
Resolved normalization flags: mode defaults merged with user overrides.
ResolvedOverride
Resolved override with pre-compiled glob matchers.
ResolvedZone
A zone with pre-compiled glob matchers.
RulesConfig
Per-issue-type severity configuration.
ScopedUsedClassMemberRule
A heritage-constrained usedClassMembers rule.
SdkPattern
A custom SDK call pattern for feature flag detection.
UnknownZoneRef
One offending zone-name reference in a boundaries.rules[] entry.
WorkspaceConfig
Workspace configuration for monorepo support.
WorkspaceDiagnostic
A diagnostic about a workspace-discovery candidate.
WorkspaceInfo
Discovered workspace info from package.json, pnpm-workspace.yaml, or tsconfig.json references.

Enums§

AuditGate
Gating mode for fallow audit.
BoundaryPreset
Built-in architecture presets.
CatalogPrecedingCommentPolicy
Policy for deleting comments immediately above removed catalog entries.
ConfigWriteError
DetectionMode
Detection mode controlling how aggressively tokens are normalized.
EmailMode
Privacy mode for author emails emitted in ownership output.
EntryPointRole
How a plugin’s discovered entry points contribute to coverage reachability.
IgnoreExportsUsedInFileConfig
Controls whether exports referenced only inside their defining file are reported as unused exports.
LogicalGroupStatus
Discovery outcome for a LogicalGroup. Discriminates “no children” into “the directory exists and is empty” versus “at least one autoDiscover path was invalid or unreadable”, so consumers can render an actionable hint instead of “0 children, mystery”.
MisconfigReason
Why an override entry is misconfigured.
OutputFormat
Output format for results.
OverrideSource
Where an override entry was declared.
PluginDetection
How to detect if a plugin should be activated.
ProductionAnalysis
Analysis-specific production-mode selector.
ProductionConfig
Production-mode defaults.
Severity
Severity level for rules.
UsedClassMemberRule
A usedClassMembers entry from config or an external plugin.
WorkspaceDiagnosticKind
Why a workspace-discovery candidate was rejected, or why a sibling directory looked workspace-like but was not declared.
WorkspaceLoadError
Workspace-discovery failures that prevent analysis from proceeding.
ZoneReferenceKind
Which zone-reference surface on a BoundaryRule carries an unknown name.
ZoneValidationError
Aggregated boundary-config validation error for FallowConfig::validate_resolved_boundaries.

Functions§

add_ignore_exports_rule
Append ignoreExports rules to an existing fallow config file.
add_ignore_exports_rule_to_string
Render the proposed content of a fallow config after appending ignoreExports rules, without touching the filesystem.
append_workspace_diagnostics
Append additions to the workspace-discovery diagnostics for root, skipping any entry whose (kind id, canonical path) is already present.
atomic_write
Atomically write content to a file via a temporary file and rename.
discover_and_validate_external_plugins
Discover external plugin definitions AND validate their user-supplied glob patterns. Accumulates all errors across all loaded plugins so the user sees every problem in one run.
discover_external_plugins
Discover and load external plugin definitions for a project.
discover_workspaces
Discover all workspace packages in a monorepo.
discover_workspaces_with_diagnostics
Discover workspace packages and return any diagnostics produced along the way.
find_undeclared_workspaces
Find directories containing package.json that are not declared as workspaces.
find_undeclared_workspaces_with_ignores
Find directories containing package.json that are not declared as workspaces, excluding candidates covered by the supplied ignore globset.
is_valid_override_value
Check whether value is a valid pnpm override right-hand side, even if it is not a semver range. Returns false when the value is empty, contains a raw newline, or is otherwise garbage.
override_misconfig_reason
Convenience: is this entry effectively a misconfiguration the user should see as an error?
override_source_label
Source-name string for diagnostics.
parse_override_key
Parse an override key into parent, target, and optional version selectors. Returns None when the key cannot be split into a recognised shape (empty key, parent or target missing).
parse_pnpm_catalog_data
Parse the catalog sections of a pnpm-workspace.yaml file.
parse_pnpm_package_json_overrides
Parse the pnpm.overrides section of a root package.json. Returns an empty PnpmOverrideData when the file has no overrides, when the JSON is malformed, or when the section is present but empty.
parse_pnpm_workspace_overrides
Parse the overrides: section of pnpm-workspace.yaml. Returns an empty PnpmOverrideData when the file has no overrides, when the YAML is malformed, or when the section is present but empty.
parse_tsconfig_root_dir
Parse tsconfig.json at the project root and extract compilerOptions.rootDir.
preserve_target_mode
Copy the target file’s existing permissions onto the temp file so the rename does not downgrade them. No-op when the target does not yet exist (fresh creation) or when the platform does not expose Unix file modes.
stash_workspace_diagnostics
Replace the workspace-discovery diagnostics for root with diagnostics.
workspace_diagnostics_for
Read the workspace-discovery diagnostics produced by the most recent stash_workspace_diagnostics + any subsequent append_workspace_diagnostics calls for root. Returns an empty vector when nothing has been stashed for this root yet (e.g. programmatic callers bypassing the standard loader).

Type Aliases§

ConfigWriteResult