* Format files grouped by the package that owns them
(
projectRoot: string,
files: { path: string; language: string; nodeCount: number }[],
includeMetadata: boolean
)
| 9268 | * Format files grouped by the package that owns them |
| 9269 | */ |
| 9270 | private formatFilesByPackage( |
| 9271 | projectRoot: string, |
| 9272 | files: { path: string; language: string; nodeCount: number }[], |
| 9273 | includeMetadata: boolean |
| 9274 | ): string { |
| 9275 | const groups = groupFilesByPackage(projectRoot, files); |
| 9276 | const lines: string[] = [`**${packageListingTitle(groups)}**`, '']; |
| 9277 | |
| 9278 | for (const group of groups) { |
| 9279 | lines.push(`**${packageGroupTitle(group)}**`); |
| 9280 | for (const file of group.files) { |
| 9281 | if (includeMetadata) { |
| 9282 | lines.push(`- ${file.path} (${file.language}, ${file.nodeCount} symbols)`); |
| 9283 | } else { |
| 9284 | lines.push(`- ${file.path}`); |
| 9285 | } |
| 9286 | } |
| 9287 | lines.push(''); |
| 9288 | } |
| 9289 | |
| 9290 | return lines.join('\n'); |
| 9291 | } |
| 9292 | |
| 9293 | /** |
| 9294 | * Format files as a tree structure |
no test coverage detected