pub struct ComplexityListing {
pub listed: usize,
pub above: usize,
pub complexity_section: Option<bool>,
pub score_only: bool,
pub baselined: bool,
pub remaining: Option<usize>,
}Expand description
What a health report says about its complexity findings. Markdown and the job summary build it from the report and use one rule, so the two surfaces agree.
Fields§
§listed: usizeThe length of the finding list.
above: usizesummary.functions_above_threshold, which fallow counts before the
baseline.
complexity_section: Option<bool>Some(true) when sections contains complexity, Some(false) when
sections does not, and None for an older report without sections.
score_only: boolTrue when the report has no vital_signs, which only a score-only run
omits. The rule reads it only when complexity_section is None.
baselined: boolTrue when the run loaded a baseline.
remaining: Option<usize>summary.baseline_staleness.remaining_findings: the functions above a
threshold that the baseline does not accept. None without a baseline
and in an older report.
Implementations§
Source§impl ComplexityListing
impl ComplexityListing
Sourcepub const fn count_unlisted(&self) -> bool
pub const fn count_unlisted(&self) -> bool
Tell if the complexity section gives the count of functions above a threshold instead of a clean result.
A run that did not produce the complexity section does not list
findings, so an empty list does not make it clean. A run that lists
findings, with an empty list and a baseline, is clean: the baseline
accepts every finding.
An older report without sections falls back to the earlier rule: a
score-only run gives the count, and another run gives the count only
without a baseline.
Sourcepub fn not_listed_note(&self) -> String
pub fn not_listed_note(&self) -> String
The sentences after the count of functions that the run does not list.
With a baseline, the note tells how many functions the baseline accepts
and how many are new. An older report without remaining_findings
says that the count includes the accepted functions.
Trait Implementations§
Source§impl Clone for ComplexityListing
impl Clone for ComplexityListing
impl Copy for ComplexityListing
Source§impl Debug for ComplexityListing
impl Debug for ComplexityListing
impl Eq for ComplexityListing
Source§impl PartialEq for ComplexityListing
impl PartialEq for ComplexityListing
impl StructuralPartialEq for ComplexityListing
Auto Trait Implementations§
impl Freeze for ComplexityListing
impl RefUnwindSafe for ComplexityListing
impl Send for ComplexityListing
impl Sync for ComplexityListing
impl Unpin for ComplexityListing
impl UnsafeUnpin for ComplexityListing
impl UnwindSafe for ComplexityListing
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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