pub struct ComplexityMetrics {
pub line: u32,
pub cyclomatic: u16,
pub cognitive: u16,
pub crap: Option<f64>,
pub line_count: u32,
pub exceeded: ExceededThreshold,
pub severity: FindingSeverity,
pub crap_estimated: bool,
}Expand description
Metric values of one base complexity finding.
Fields§
§line: u321-based line of the function. Only orders same-named findings.
cyclomatic: u16Cyclomatic complexity.
cognitive: u16Cognitive complexity.
crap: Option<f64>CRAP score, when coverage data exists.
line_count: u32Lines of code in the function body.
exceeded: ExceededThresholdThe thresholds that the finding exceeded in its own run.
severity: FindingSeverityThe severity tier of the finding in its own run.
crap_estimated: boolWhether the CRAP score comes from estimated coverage.
Implementations§
Source§impl ComplexityMetrics
impl ComplexityMetrics
Sourcepub const fn of(finding: &ComplexityViolation) -> Self
pub const fn of(finding: &ComplexityViolation) -> Self
The metric values of one finding.
Trait Implementations§
Source§impl Clone for ComplexityMetrics
impl Clone for ComplexityMetrics
impl Copy for ComplexityMetrics
Source§impl Debug for ComplexityMetrics
impl Debug for ComplexityMetrics
Source§impl PartialEq for ComplexityMetrics
impl PartialEq for ComplexityMetrics
impl StructuralPartialEq for ComplexityMetrics
Auto Trait Implementations§
impl Freeze for ComplexityMetrics
impl RefUnwindSafe for ComplexityMetrics
impl Send for ComplexityMetrics
impl Sync for ComplexityMetrics
impl Unpin for ComplexityMetrics
impl UnsafeUnpin for ComplexityMetrics
impl UnwindSafe for ComplexityMetrics
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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