pub struct HealthFinding {
pub violation: ComplexityViolation,
pub actions: Vec<HealthFindingAction>,
pub introduced: Option<bool>,
}Expand description
Wire envelope for a single complexity finding.
Fields§
§violation: ComplexityViolationInner complexity-violation payload.
actions: Vec<HealthFindingAction>Machine-actionable fix and suppress hints.
introduced: Option<bool>Audit-mode flag indicating whether the finding is new versus the base snapshot.
Implementations§
Source§impl HealthFinding
impl HealthFinding
Sourcepub fn new(
violation: ComplexityViolation,
actions: Vec<HealthFindingAction>,
introduced: Option<bool>,
) -> Self
pub fn new( violation: ComplexityViolation, actions: Vec<HealthFindingAction>, introduced: Option<bool>, ) -> Self
Construct a wrapper around a pre-computed action list.
Sourcepub fn with_actions(
violation: ComplexityViolation,
ctx: &HealthActionContext,
) -> Self
pub fn with_actions( violation: ComplexityViolation, ctx: &HealthActionContext, ) -> Self
Construct a wrapper with actions computed from the finding and
report-wide context.
Methods from Deref<Target = ComplexityViolation>§
Sourcepub fn blocks(&self) -> bool
pub fn blocks(&self) -> bool
Whether the finding fails the run.
A warn gate severity does not block. A finding without the field, for
example from an older saved report, blocks as before.
Sourcepub fn resolved_thresholds(
&self,
summary: &HealthSummary,
) -> HealthEffectiveThresholds
pub fn resolved_thresholds( &self, summary: &HealthSummary, ) -> HealthEffectiveThresholds
Ceilings this finding was actually evaluated against: the per-file
thresholdOverrides result when an override matched, otherwise the
run’s global summary ceilings.
Every renderer that prints or compares a threshold must go through this so a finding is never described against a ceiling it was not measured with.
Trait Implementations§
Source§impl Clone for HealthFinding
impl Clone for HealthFinding
Source§impl Debug for HealthFinding
impl Debug for HealthFinding
Source§impl Deref for HealthFinding
impl Deref for HealthFinding
Source§impl<'de> Deserialize<'de> for HealthFinding
impl<'de> Deserialize<'de> for HealthFinding
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<ComplexityViolation> for HealthFinding
impl From<ComplexityViolation> for HealthFinding
Source§fn from(violation: ComplexityViolation) -> Self
fn from(violation: ComplexityViolation) -> Self
Wrap a violation with empty actions and no introduced flag.