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: StringGroup 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: usizeFiles participating in this group after workspace and ignore filters.
functions_above_threshold: usizeNumber 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: usizeNumber 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: usizeNumber 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: usizeNumber 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: usizeNumber 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.