* Render a `recommendedFixTarget` value in text mode. Shared by * `renderResultText` (under `--include-analysis`), * `renderFailureContextText`, and `renderFailureSummaryText` so the * three surfaces format the field identically. * * `null` (M2.1 visibility policy) renders as "— (analysis pipel
(lines: string[], fix: CliFixTarget | null, label: string)
| 8258 | * reference and indented rationale. |
| 8259 | */ |
| 8260 | function appendFixTargetLines(lines: string[], fix: CliFixTarget | null, label: string): void { |
| 8261 | if (fix === null) { |
| 8262 | lines.push(`${label}— (analysis pipeline did not propose one)`); |
| 8263 | return; |
| 8264 | } |
| 8265 | const ref = fix.reference ? ` reference=${fix.reference}` : ''; |
| 8266 | lines.push(`${label}kind=${fix.kind}${ref}`); |
| 8267 | if (fix.rationale !== null) { |
| 8268 | // Indent the rationale to the column under the value. The exact |
| 8269 | // column doesn't have to match the label width across surfaces; |
| 8270 | // a fixed two-space hanging indent keeps the rendering local to |
| 8271 | // this helper so callers don't pad themselves. |
| 8272 | lines.push(` ${fix.rationale}`); |
| 8273 | } |
| 8274 | } |
| 8275 | |
| 8276 | /** |
| 8277 | * §5.2 / M2.1 piece 3 — text renderer for `test failure summary`. |
no outgoing calls
no test coverage detected