Skip to main content

HealthGroup

Struct HealthGroup 

Source
pub struct HealthGroup {
Show 19 fields pub key: String, pub owners: Option<Vec<String>>, pub files_analyzed: usize, pub functions_above_threshold: usize, pub severity_critical_count: usize, pub severity_high_count: usize, pub severity_moderate_count: usize, pub hotspot_count: usize, pub coverage_source_consistency: Option<CoverageSourceConsistency>, pub vital_signs: Option<VitalSigns>, pub health_score: Option<HealthScore>, pub trend: Option<HealthTrend>, pub trend_status: Option<GroupTrendStatus>, pub findings: Vec<HealthFinding>, pub file_scores: Vec<FileHealthScore>, pub hotspots: Vec<HotspotFinding>, pub large_functions: Vec<LargeFunctionEntry>, pub targets: Vec<RefactoringTargetFinding>, pub actions_meta: Option<HealthActionsMeta>,
}
Expand description

A health report scoped to a single group.

key is the group label produced by the resolver (workspace package name, CODEOWNERS owner, directory, or section). owners is populated only for --group-by section (mirrors dead-code grouped output).

Per-group vital_signs and health_score are recomputed from the files in the group, so they answer “what is the health of workspace X” in a single invocation. files_analyzed and functions_above_threshold summarise the subset for parity with the project-level project-level health summary.

A group carries a per-file list (findings, file_scores, hotspots, large_functions, targets) only when the project report shows the same list. A --score run keeps the score and the counts of each group and omits the lists.

Fields§

§key: String

Group identifier produced by the resolver. For ‘package’ grouping: workspace package name (e.g. ‘@scope/app-a’) or ‘(root)’ for files outside any workspace. For ‘owner’ grouping: the CODEOWNERS team. For ‘directory’ grouping: the top-level directory prefix. For ‘section’ grouping: the GitLab CODEOWNERS section name, or ‘(no section)’ / ‘(unowned)’ for unmatched files.

§owners: Option<Vec<String>>

Section default owners (GitLab CODEOWNERS [Section] @owner1 @owner2). Present only when grouped_by is ‘section’.

§files_analyzed: usize

Files participating in this group after workspace and ignore filters.

§functions_above_threshold: usize

Number of findings in this group, mirroring the project-level summary.functions_above_threshold semantics post-baseline / post---top truncation. When --top was supplied this reflects the rendered finding count of the group, not the un-truncated total.

§severity_critical_count: usize

Number of critical-severity findings in this group, after the baseline filter and before --top. The project summary.severity_critical_count counts before the baseline filter, so with --baseline the group counts can add up to less.

§severity_high_count: usize

Number of high-severity findings in this group, after the baseline filter and before --top. The project summary.severity_high_count counts before the baseline filter, so with --baseline the group counts can add up to less.

§severity_moderate_count: usize

Number of moderate-severity findings in this group, after the baseline filter and before --top. The project summary.severity_moderate_count counts before the baseline filter, so with --baseline the group counts can add up to less.

§hotspot_count: usize

Number of ranked hotspot entries in this group, before --top. This is the length of the group’s ranked hotspot list. It is not vital_signs.hotspot_count, which counts only the files with a hotspot score of 50 or more and feeds the health score.

§coverage_source_consistency: Option<CoverageSourceConsistency>

Whether CRAP findings in this group share a single coverage-source kind (uniform) or combine Istanbul / estimated / inherited sources (mixed). Absent when no grouped finding carries CRAP source data.

§vital_signs: Option<VitalSigns>

Per-group vital signs recomputed from the files in this group. Absent when –score-only suppressed top-level vital signs.

§health_score: Option<HealthScore>

Per-group health score recomputed from the per-group vital signs. Absent when –score was not requested. The duplication penalty counts each clone group with two or more instances in total and one or more in this group, and counts only the lines of the instances in this group. A clone that spans two groups thus lowers the score of each group. dupes --group-by assigns each clone group to one owner instead.

§trend: Option<HealthTrend>

Trend of this group against the same group in the baseline snapshot. Present only when --trend or --trend-from was requested and the baseline holds this group with the same grouped_by mode.

§trend_status: Option<GroupTrendStatus>

Why trend is present or absent. Present only when a trend was requested and a baseline snapshot was loaded.

§findings: Vec<HealthFinding>

Findings restricted to files in this group. Each entry is the typed HealthFinding wrapper around a ComplexityViolation payload.

§file_scores: Vec<FileHealthScore>

File scores restricted to files in this group.

§hotspots: Vec<HotspotFinding>

Hotspots restricted to files in this group. Each entry is the typed HotspotFinding wrapper around a HotspotEntry payload.

§large_functions: Vec<LargeFunctionEntry>

Large functions in files belonging to this group.

§targets: Vec<RefactoringTargetFinding>

Refactoring targets in files belonging to this group. Each entry is the typed RefactoringTargetFinding wrapper around a RefactoringTarget payload.

§actions_meta: Option<HealthActionsMeta>

Auditable breadcrumb recording why suppress-line action hints were omitted from this group’s findings. Mirrors the project-level HealthReport.actions_meta; populated at construction time when the per-group HealthActionContext suppresses inline hints.

Trait Implementations§

Source§

impl Clone for HealthGroup

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HealthGroup

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for HealthGroup

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more