lanekeep_core/lib.rs
1//! Core types and execution engine for lanekeep.
2//!
3//! File walking, query evaluation, the facts pipeline, violations, and the `Rule` trait.
4//!
5//! This crate owns the contract every other crate is written against. `Rule` is treated as
6//! public API that happens not to be published: no built-in rule may reach past it into
7//! walker internals or cache state, because that boundary is what keeps future rule sources
8//! additive. See `docs/architecture.md` ยง14.
9//!
10//! # What is here so far
11//!
12//! Rule identity, severity, source locations, rule cards, violations with their canonical
13//! ordering, and the facts a per-file pass hands to the reduce phase.
14//!
15//! These types are foundational in a specific sense: they are what appears in JSON output,
16//! in cache entries, and in suppression comments users type by hand. Getting them wrong is
17//! expensive in a way that getting the walker wrong is not, because only these are visible
18//! from outside.
19
20pub mod card;
21pub mod changed;
22pub mod discovery;
23pub mod fact;
24pub mod fix;
25pub mod gates;
26pub mod location;
27pub mod rule_id;
28pub mod severity;
29pub mod suppression;
30pub mod tracked;
31pub mod violation;
32
33pub use card::{CardProblem, Examples, RuleCard};
34pub use changed::ChangeError;
35pub use discovery::{Discovery, DiscoveryError};
36pub use fact::Fact;
37pub use fix::Fix;
38pub use gates::{CompiledGates, GateError, Gates};
39pub use location::{FilePath, Location, Position};
40pub use rule_id::{Namespace, ParseRuleIdError, RuleId};
41pub use severity::{ParseSeverityError, Severity};
42pub use suppression::{Suppression, Suppressions};
43pub use tracked::{ContentHash, TrackedRead};
44pub use violation::{Violation, any_failing, sort};