(
details: readonly DetailTreeItem[],
options: DetailTreeFormattingOptions = {},
)
| 134 | } |
| 135 | |
| 136 | function formatDetailTreeLines( |
| 137 | details: readonly DetailTreeItem[], |
| 138 | options: DetailTreeFormattingOptions = {}, |
| 139 | ): string[] { |
| 140 | const valueDetails: DetailTreeValueItem[] = []; |
| 141 | const pathDetails: DetailTreePathItem[] = []; |
| 142 | for (const detail of details) { |
| 143 | if (isPathDetailItem(detail)) { |
| 144 | pathDetails.push(detail); |
| 145 | } else { |
| 146 | valueDetails.push(detail); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | if (pathDetails.length === 0) { |
| 151 | return formatValueDetailTreeLines(valueDetails); |
| 152 | } |
| 153 | |
| 154 | const pathLines = |
| 155 | options.filePathRenderStyle === 'list' |
| 156 | ? formatPathListLines(pathDetails) |
| 157 | : formatPathTree(pathDetails, { formatPath: displayPath }); |
| 158 | |
| 159 | const lines = valueDetails.map((detail) => ` ├ ${detail.label}: ${detail.value}`); |
| 160 | lines.push(' \u2514 Files:'); |
| 161 | for (const line of pathLines) { |
| 162 | lines.push(` ${line}`); |
| 163 | } |
| 164 | return lines; |
| 165 | } |
| 166 | |
| 167 | // --- Diagnostic path resolution --- |
| 168 |
no test coverage detected