Expand description
alint-core — engine, walker, rule trait, config AST.
See docs/design/ARCHITECTURE.md in the alint repository for the
rule model, execution order, and crate layout rationale.
Re-exports§
pub use facts::FactKind;pub use facts::FactSpec;pub use facts::FactValue;pub use facts::FactValues;pub use facts::evaluate_facts;pub use when::WhenEnv;pub use when::WhenError;pub use when::WhenExpr;
Modules§
- facts
- Facts — cached properties of the repository evaluated once per run and
referenced by
whenclauses on rules (shipping in a later commit). - template
- String substitution for path templates and message templates.
- when
- The
whenexpression language — bounded DSL for gating rules on facts.
Structs§
- Config
- Parsed form of a
.alint.ymlfile. - Context
- Execution context handed to each rule during evaluation.
- Engine
- Executes a set of rules against a pre-built
FileIndex. - File
Append FixSpec - File
Create FixSpec - File
Entry - A single filesystem entry discovered by the walker.
- File
Index - The indexed result of one filesystem walk. All rules share this index —
the walk happens once per
alint checkinvocation. - File
Prepend FixSpec - File
Remove FixSpec - File
Rename FixSpec - Empty marker:
file_renametakes no parameters. The target name is derived from the parent rule (e.g.filename_caseconverts the stem to its configured case; the extension is preserved). - FixContext
- Runtime context for applying a fix.
- FixItem
- FixReport
- Outcome of running
Engine::fixagainst a repository. OneFixRuleResultper rule that produced violations; rules that passed are omitted. - FixRule
Result - Nested
Rule Spec - Rule specification for nested rules (e.g. the
require:block offor_each_dir). UnlikeRuleSpec,idandlevelare synthesized from the parent rule — users just supply thekindplus kind-specific options, optionally with amessage/policy_url/when. - Report
- Rule
Entry - A rule bundled with an optional
whenexpression. Rules with awhenthat evaluates to false at runtime are skipped (noRuleResultis produced) — same observable effect aslevel: off, but gated on facts. - Rule
Registry - Map from
kindstring → factory function. Built-in rule crates register themselves here at startup, and plugin rules (in later phases) will too. - Rule
Result - The collected outcome of evaluating a single rule.
- Rule
Spec - YAML-level description of a rule before it is instantiated into a
Box<dyn Rule>by aRuleBuilder. - Scope
- Compiled include/exclude matcher built from a
PathsSpecor raw pattern list. - Violation
- A single linting violation produced by a rule.
- Walk
Options
Enums§
- Error
- FixOutcome
- The result of applying (or simulating) one fix against one violation.
- FixSpec
- The
fix:block on a rule. Exactly one op key must be present — alint errors at load time when the op and rule kind are incompatible. - FixStatus
- Level
- Paths
Spec - YAML shape for a rule’s
paths:field — a single glob, an array (with optional!patternnegations), or an explicit{include, exclude}pair. For the include/exclude form, each field accepts either a single string or a list of strings.
Traits§
- Fixer
- A mechanical corrector for a specific rule’s violations.
- Rule
- Trait every built-in and plugin rule implements.