* Format files grouped by the package that owns them
(
projectRoot: string,
files: { path: string; language: string; nodeCount: number }[],
includeMetadata: boolean
)
| 9305 | * Format files grouped by the package that owns them |
| 9306 | */ |
| 9307 | private formatFilesByPackage( |
| 9308 | projectRoot: string, |
| 9309 | files: { path: string; language: string; nodeCount: number }[], |
| 9310 | includeMetadata: boolean |
| 9311 | ): string { |
| 9312 | const groups = groupFilesByPackage(projectRoot, files); |
| 9313 | const lines: string[] = [`**${packageListingTitle(groups)}**`, '']; |
| 9314 | |
| 9315 | for (const group of groups) { |
| 9316 | lines.push(`**${packageGroupTitle(group)}**`); |
| 9317 | for (const file of group.files) { |
| 9318 | if (includeMetadata) { |
| 9319 | lines.push(`- ${file.path} (${file.language}, ${file.nodeCount} symbols)`); |
| 9320 | } else { |
| 9321 | lines.push(`- ${file.path}`); |
| 9322 | } |
| 9323 | } |
| 9324 | lines.push(''); |
| 9325 | } |
| 9326 | |
| 9327 | return lines.join('\n'); |
| 9328 | } |
| 9329 | |
| 9330 | /** |
| 9331 | * Format files as a tree structure |
no test coverage detected