pub struct ComplexityAnalyzer { /* private fields */ }Expand description
Analyzer that flags files exceeding a per-file line count and tracks TODO markers.
The line-count threshold defaults to 500 for backward compatibility
(matching the original hardcoded limit). When constructed via
Self::with_model (requires ecc), a learned
ComplexityModel is consulted
per file; an untrained model falls back to the same 500-line
threshold so the default remains drop-in safe.
NOTE(eml-swap): wired — Finding #5 (ComplexityModel).
Implementations§
Source§impl ComplexityAnalyzer
impl ComplexityAnalyzer
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a complexity analyzer using the hardcoded 500-line threshold (no learned model).
Sourcepub fn with_model(model: ComplexityModel) -> Self
pub fn with_model(model: ComplexityModel) -> Self
Create a complexity analyzer backed by a learned
ComplexityModel. Untrained models fall back to the
hardcoded 500-line threshold so this is drop-in safe.
Sourcepub fn model(&self) -> Option<&ComplexityModel>
pub fn model(&self) -> Option<&ComplexityModel>
Returns a reference to the learned model, if installed.
Trait Implementations§
Source§impl Analyzer for ComplexityAnalyzer
impl Analyzer for ComplexityAnalyzer
Source§fn categories(&self) -> &[&str]
fn categories(&self) -> &[&str]
Categories of findings this analyzer may produce.
Auto Trait Implementations§
impl Freeze for ComplexityAnalyzer
impl RefUnwindSafe for ComplexityAnalyzer
impl Send for ComplexityAnalyzer
impl Sync for ComplexityAnalyzer
impl Unpin for ComplexityAnalyzer
impl UnsafeUnpin for ComplexityAnalyzer
impl UnwindSafe for ComplexityAnalyzer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more