pub struct RefactoringTargetAction {
pub kind: RefactoringTargetActionType,
pub auto_fixable: bool,
pub description: String,
pub category: Option<String>,
pub comment: Option<String>,
}Expand description
Suggested action attached to a RefactoringTarget.
The list always begins with apply-refactoring. A trailing
suppress-line is appended only when the target carries evidence
linking to specific functions (e.g., extract_complex_functions,
add_test_coverage).
Unlike HealthFindingAction, the suppress-line variant emitted
here does NOT carry a placement field: the parent
RefactoringTarget points at a file (not a specific function
declaration site), so a per-line placement hint would have no
referent. Consumers that want the placement metadata should follow
the target’s evidence.complex_functions back to the matching
ComplexityViolation and read placement from THAT action instead.
Fields§
§kind: RefactoringTargetActionTypeAction type identifier.
auto_fixable: boolWhether fallow fix can auto-apply this action. Today both
variants are manual.
description: StringHuman-readable description of the action. For apply-refactoring
this is the target’s own recommendation string; for
suppress-line it is the suppression prompt.
category: Option<String>Recommendation category for apply-refactoring actions. Mirrors
the parent target’s
category
field so consumers can route on the action alone.
comment: Option<String>The inline comment to insert. Present on suppress-line actions
when evidence exists.