* Format files grouped by the package that owns them
(
projectRoot: string,
files: { path: string; language: string; nodeCount: number }[],
includeMetadata: boolean
)
| 8993 | * Format files grouped by the package that owns them |
| 8994 | */ |
| 8995 | private formatFilesByPackage( |
| 8996 | projectRoot: string, |
| 8997 | files: { path: string; language: string; nodeCount: number }[], |
| 8998 | includeMetadata: boolean |
| 8999 | ): string { |
| 9000 | const groups = groupFilesByPackage(projectRoot, files); |
| 9001 | const lines: string[] = [`**${packageListingTitle(groups)}**`, '']; |
| 9002 | |
| 9003 | for (const group of groups) { |
| 9004 | lines.push(`**${packageGroupTitle(group)}**`); |
| 9005 | for (const file of group.files) { |
| 9006 | if (includeMetadata) { |
| 9007 | lines.push(`- ${file.path} (${file.language}, ${file.nodeCount} symbols)`); |
| 9008 | } else { |
| 9009 | lines.push(`- ${file.path}`); |
| 9010 | } |
| 9011 | } |
| 9012 | lines.push(''); |
| 9013 | } |
| 9014 | |
| 9015 | return lines.join('\n'); |
| 9016 | } |
| 9017 | |
| 9018 | /** |
| 9019 | * Format files as a tree structure |
no test coverage detected