pub struct AuditEngine { /* private fields */ }Expand description
The main engine that drives the Lingora audit process.
AuditEngine is responsible for:
- Discovering Fluent (
.ftl) and Rust (.rs) files from configured paths - Building a
Workspacemodel - Running the analysis
Pipeline(parsing → document collection → classification → auditing) - Returning a complete
AuditResultcontaining issues and classified documents
Implementations§
Source§impl AuditEngine
impl AuditEngine
Sourcepub fn run(&self) -> Result<AuditResult, LingoraError>
pub fn run(&self) -> Result<AuditResult, LingoraError>
Executes the full audit pipeline and returns the result.
Steps performed (via Pipeline):
- Parse all Fluent and Rust files
- Aggregate entries into
FluentDocuments per locale - Classify documents as Canonical / Primary / Variant / Orphan
- Compare canonical vs targets (missing keys, redundants, signatures, etc.)
- Validate Rust macro usage against canonical identifiers
Returns Ok(AuditResult) on success, even if issues are found (use AuditResult::is_ok() to check cleanliness).
Trait Implementations§
Source§impl Debug for AuditEngine
impl Debug for AuditEngine
Source§impl TryFrom<&LingoraToml> for AuditEngine
impl TryFrom<&LingoraToml> for AuditEngine
Source§type Error = LingoraError
type Error = LingoraError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for AuditEngine
impl RefUnwindSafe for AuditEngine
impl Send for AuditEngine
impl Sync for AuditEngine
impl Unpin for AuditEngine
impl UnsafeUnpin for AuditEngine
impl UnwindSafe for AuditEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.